Imagine a that one of the carbon brushes is connected to a positive terminal of a DC voltage source (eg: battery) and the other brush to the negative terminal.
A current, $I$, will flow through the rotor winding from the positive terminal to the negative terminal. As the current flows through the magnetic field $B$ set up by the permanent magnet, the wire carrying the current experiences a force, given by $F=IL\times B$, where L is the length of the wire segment in the magnetic field. So for the wire segment a-b, the current is flowing into the page so the force on the wire due to the magnetic field will be upwards, whereas for segment c-d, the current is flowing out of the page (back towards the negative terminal) so the force on the wire will be downwards. The net result is a torque (spinning force) on the rotor, causing it to spin clockwise.
When the rotor spins $90^{O}$, the commutator also spins $90^{O}$ (since it is connected to the rotor shaft). At this point, there is no torque on the rotor. The rotor however will continue past the $90^{O}$ point under its own inertia. The split in the commutator now causes the current to flow in the reverse direction through the winding. Since the rotor has moved past $90^{O}$, the current through d-c is now into the page and the resulting force is upward, whereas the current through section b-a is out from the page and the resulting force is downward. So the torque on the rotor is in the same direction as before.
So the commutator produces a 'reversal' of the applied voltage is required every time the rotor winding goes past the $90^{O}$ and $270^{O}$ point (when the torque on the rotor is zero). The voltage must be reversed at these points to ensure the current in each segment of the loop has the same 'sense' with respect to the permanent magnetic field, as the rotor spins, to ensure the net torque is always in the same direction (clockwise). Otherwise, the rotor will simply 'wobble' about the $90^{O}$ point and not spin as a proper motor should!