Step-by-step explanation:
If a coil of wire is placed in a magnetic field and rotated, an alternating (sinusoidal) current is induced. As it rotates, sometimes it is cutting through lots of magnetic flux, and so lots of current is
induced.
At other times, it is moving parallel to
the flux, and so no flux is cut, and no current is induced. In between, some current is induced. This creates an alternating current. Either end of the coil can be connected to wires outside of the generator in order to use the current elsewhere. This would be fine for the
first few rotations, but after this, the wires would get tangled up and the generator would be useless. To avoid this, we use a commutator. In an AC generator, this is a pair of rotating conducting 'slip rings' attached to either end of the coil. Carbon brushes bring these into contact with the outside world.