The commutator is really just a switch. As it rotates, it changes the direction of the electricity in electric motors and generators. By reversing the electricity flow in an electric motor armature (moving coil) a rotating force is produced which in turn rotates the armature and converts the electrical force to mechanical force. In a generator, the commutator does exactly the reverse; it converts the mechanical force to electrical force.
First put to use in 1832, a commutator is a set of segments, usually made of copper, set around the outside of the rotor, either in a motor or a generator. Brushes, usually made of carbon, are forced against it by a spring loaded mechanism and these either carry the electricity to the motor, or, in the case of a generator, carry the electricity away. Each segment is separated from adjacent segments by an insulation material such as mica or some sort of polymer. Each segment is also connected to a specific number of coils in the armature of the motor or generator. The number segments and the number of armature coils depend on the speed and power of the motor or generator.
Friction is a major problem with machines employing this system. Brushes wear out and in turn cause wear to the commutator. There are two types of brushes copper and carbon. While the copper variety can cause scoring they are still used on low voltage / high current machines. The carbon brushes are softer and cause less damage; and in general, are used on high voltage / low current machines. Large generators and motors may be repaired when the commutator fails, however, small generators and motors are usually discarded.