An electric generator produces electricity by spinning a coil of wire, called an armature or rotor, within a magnetic field. There are two types of electric generators: alternating current (AC) and direct current (DC).
A DC generator produces an electrical current that flows in only one direction, hence the term "direct current." The current produced by an AC generator, also called an alternator, constantly switches directions.
Each terminal of a DC generator's armature connects to a different segment of the commutator, which is a two-segmented metal ring. As the armature spins, so does the commutator, which transmits the electrical current to two graphite connectors called brushes. Each brush touches a different segment of the commutator every half rotation of the armature, thereby keeping the polarity of the electrical current positive and the current flowing in the same direction.
Instead of a two-segmented commutator, an AC generator has two metal slip rings which spin with the armature. Each terminal of the armature connects to a different slip ring. However, unlike a commutator, each slip ring transmits electrical current to just one brush, rather than a different brush every half rotation. A slip ring's polarity changes when the armature turns from one pole of the generator's magnet to the other, causing the electrical current to reverse directions.