Sketch of a cross-section of slip rings for an electric motor. In this example, the slip rings have a brush-lifting device and a sliding contact bar, allowing the slip-rings to be short-circuited when no longer required. This can be used in starting a slip-ring induction motor, for example.
A pair of carbon brushes
Slip rings on a hydroelectric generator; 
A - stationary spring-loaded graphite brushes, 
B - rotating steel contact ring, 
C - insulated connections to generator field winding, 
D - top end of generator shaft.

Originally this was accomplished by affixing a copper or brass commutator or 'slip ring' to the shaft, with springs pressing braided copper wire 'brushes' onto the slip rings or commutator which conduct the current.

- Brush (electric)

Either the brushes or the rings are stationary and the other component rotates.

- Slip ring
Sketch of a cross-section of slip rings for an electric motor. In this example, the slip rings have a brush-lifting device and a sliding contact bar, allowing the slip-rings to be short-circuited when no longer required. This can be used in starting a slip-ring induction motor, for example.

1 related topic

Alpha

Commutator in a universal motor from a vacuum cleaner. Parts: (A) commutator, (B) brush, (C) rotor (armature) windings, (D) stator (field) windings, (E) brush guides, (F) electrical connections.

Commutator (electric)

Rotary electrical switch in certain types of electric motors and electrical generators that periodically reverses the current direction between the rotor and the external circuit.

Rotary electrical switch in certain types of electric motors and electrical generators that periodically reverses the current direction between the rotor and the external circuit.

Commutator in a universal motor from a vacuum cleaner. Parts: (A) commutator, (B) brush, (C) rotor (armature) windings, (D) stator (field) windings, (E) brush guides, (F) electrical connections.
400px
Cross-section of a commutator that can be disassembled for repair.
A tiny 5-segment commutator less than 2 mm in diameter, on a direct-current motor in a toy radio control ZipZaps car.
Various types of copper and carbon brushes.
Compound carbon brush holder, with individual clamps and tension adjustments for each block of carbon.
Different types of brushes have different brush contact angles
Commutator and brush assembly of a traction motor; the copper bars can be seen with lighter insulation strips between the bars. Each dark grey carbon brush has a short flexible copper jumper lead attached. Parts of the motor field winding, in red, can be seen to the right of the commutator.
Commutating plane definitions.
Centered position of the commutating plane if there were no field distortion effects.
Actual position of the commutating plane to compensate for field distortion.
Brush advance for Self-Induction.
Low voltage dynamo from late 1800s for electroplating. The resistance of the commutator contacts causes inefficiency in low voltage, high current machines like this, requiring a huge elaborate commutator. This machine generated 7 volts at 310 amps.

Two or more electrical contacts called "brushes" made of a soft conductive material like carbon press against the commutator, making sliding contact with successive segments of the commutator as it rotates.

In this instance, the rotating contacts are continuous rings, called slip rings, and no switching happens.