How does an electric motor operate?
When a conductor ( coil in picture)carries electric current in magnetic field the force is acting upon the conductor.
With strong magnet and several conductors rotational motion is given to the conductors..The force acting on conductors is marked in pink color... This causes the coils to rotate.
This reverse of a generator.
Picture credit oocities.org.