A motor uses commutator to reverse the current.
Commutator is simply a mechanical rectifier used to reverse the direction of current every time coil moves through the plane perpendicular to the magnetic field. So as to keep the torque on a DC motor from reversing its direction.