A motor has three main parts. The first is the rotor. This is the part of a motor that spins. It is usually wrapped with many coils so that when electricity passes through it, it makes a magnet. The rotor spins in the magnetic field created by the stator.
The stator is the part of the motor which creates a magnetic field that spins the rotor. It usually surrounds the rotor entirely, creating a strong field. It too is usually wrapped with coils of wire to make a magnet when electricity passes through it.
The final part which makes a motor work is the commutator. This is the piece which makes sure the rotor spins. When the brushes of electricity touch the conducting sides, the magnet turns on, and the rotor spins. However when it spins, the brushes move to where there is no conductor, and the rotor keeps freely spinning. This cycle happens over and over again very quickly, making the motor turn full revolutions.