The commutator itself is a split ring, and generally, each end of the ring is connected to each end of the armature coil. If the armature has multiple coils, the commutator will also have multiple segments, one for each end of each coil. Carbon brushes are installed on each side of the commutator, and when the commutator rotates, The contactor supplies voltage to the commutator section and the corresponding armature coil.
When the carbon brush passes through the gap of the commutator, the provided charge will switch the commutator section, thereby switching the polarity of the armature coil. This conversion of the coil polarity keeps the armature rotating in one direction. The voltage between the brushes fluctuates between zero and maximum, but always maintains the same polarity.
The word "brushes" was coined in the early days of DC motors when they consisted of multiple strands of copper wire. These devices require frequent replacement and damage to the commutator ring. Modern DC motors often use "brushes" made of carbon. These brushes wear more slowly and cause less damage to the commutator.
The above is a conventional brushed DC motor. These motors are commutated mechanically. Brushless DC motors also need to be commutated. However, for brushless designs, commutation is performed electronically through encoders or Hall-effect sensors. The sensor senses the position of the rotor to determine when and how to energize the coil.