AC voltage is generated on the principle of Law of electromagnetic induction. Consider a simple model of generator.
Suppose a rectangular coil is rotating, in anticlockwise direction, on a fixed axis within the strong magnetic field of two permanent magnets. Then AC voltage is produced across its two end points A-B. The voltage thus, produced at each position.Mechanism of AC voltage generation. Note the position of rotating coil within the magnetic field with respect to right side figure.