A simple
generatoris similar to an electric motor.
With a motor, we put electrical energy in and get
rotational energyout,
with a generator we put rotational energy in and get electrical energy out.

As with the
motor, the current direction changes
with each half turn of the generator.
The generator produces
alternating current
because slip rings are used in place of a split - ring commutator.