Long ago, electricity power meters (kWh, kVAh and kVArh) operated using eddy-current motors that spun a metal disk. The disk was connected via gears to a series of mechanical dials which could be visually read. The various windings for the eddy-current motors were wound such that the mechanical arrangement produced
torque in the disk proportional to the product of the electric fields from the current-windings and the voltage-windings. The phase relationship was alterable during the construction via the relative physical relationship between the windings.
The days it is all done with microprocessor devices & digital signal processing methods. For the most part, this is an improvement, as the old electromechanical instruments would develop inaccuracies as the jewel bearings became worn. However, the older meters were actually more accurate in measuring power in non-linear loads.