You know, I can answer this question, I know all about it. I just don't know how to explain it!
The rotor of a motor, the part that spins, has a number of magnets mounted in a cylinder that spins on a shaft. The magnets are mounted so that their poles point out radially from the shaft, and as you go around the outside the poles alternate N, S, N, S, etc.
Around this rotor is the stator, the part that remains still. On the stator are a series of coils that act like electromagnets (induced magnets) when current flows through them. They are also powered back and forth, N, S, N, S, as you go around the inside of the stator. They are just far enough from the magnets of the rotor that they don't interfere with its rotation.
Now as the motor is turning, one of the poles of the rotor is between two differently-charged coils of the stator. It is repelled by the one that's charged the same and attracted to the one that's charged differently, by the attraction and repulsion forces of magnets. But just as it passes the next pole of the stator, the current in the stator reverses so the pole of the rotor is now attracted to the next pole of the rotor.
Now on the end of the shaft of the rotor is a cylinder made up of contacts separated radially (that is, with lines coming out from the axis of the shaft) That's the commutator. Stationary sliding contacts ('brushes') go against this wheel of contacts, and as the rotor rotates, these sliding contacts cause the current to reverse at just the right timing to keep the motor going.
A motor converts electrical energy into kinetic energy, mechanical energy.