An AC generator, also called an alternator, is a device that converts mechanical energy into electrical energy. "AC" stands for "alternating current." The device generates alternating voltage by rotating a coil in the magnetic field.
Alternating voltage is also generated when a magnetic field is rotated within a stationary coil. The value of generated voltage depends on the speed of the rotating coil or magnetic field, strength of the field and the number of turns in the coil. A wire passes through a magnetic field, causing electrons in the wire to move together in a single direction. An AC generator produces an alternating current because the electrons flow first in one direction.