What is the X in X-mas?
An electric generator that produces alternating current. The generator's coil is rotated (by a turbine, motor, or other power source), and its circular path causes it to cut cross a magnetic field (set up by strong magnets), first in one direction, then the other, with each cycle. The electric potential induced in the coil by this motion thus alternates between positive and negative once with each cycle, resulting in alternating current. See more at induction.