A motor is a device that uses electrical energy to produce mechanical energy, or movement. Electric motors use electrical energy to spin. Anything attached to an electric motor will harness that spinning motion. Objects powered by motors include everything from cars to watches and from washing machines to sewing machines.
When electricity flows through a wire, it creates a magnetic field. You can create an electromagnet by coiling a piece of wire, inserting a piece of metal through the coil, and sending an electric current through it. The electromagnet, like all magnets, will then have a north pole and a south pole.
3. Field Magnet
Imagine that you have created an electromagnet and put it between the arms of a horseshoe magnet. Because of the properties of magnetism, the electromagnet will spin until its north pole is facing the south pole of the horseshoe magnet and its south pole is facing the north pole of the electromagnet. Then the electromagnet would stop spinning.
4. AC Current
By definition, alternating current (AC) changes the direction of its flow multiple times every second. Because of this, if the current running through the electromagnet is AC, the north and south poles on the electromagnet keep on alternating as well. Therefore, the electromagnet will keep on spinning.