The commutator ring of an electric motor reverses the direction of current flowing through the coil every time the coil barely reaches the vertical position during a rotation.
Commutators and brushes are employed in all DC generators and DC motors.
The commutator ensures that the current flowing through the rotor windings is always in the same direction and that the right coil on the rotor is activated in relation to the field coils.
Therefore, as the direction of the current is reversed, the torque is changed in the direction.