Electromagnets
The needle of a compass is an example of a permanent magnet. A conductor that is not connected to an electric circuit will not affect the position of the needle. Instead, the needle of the compass continues to point towards the north.
When the electric circuit is closed, the conductor becomes an electromagnet. The permanent magnet or needle of the compass now turns away from the conductor. This is how electromagnets can be used to produce movement. In other words, magnets can be used to convert electricity into movement energy.

An electric circuit and a compass. When the circuit is closed, the conductor becomes an electromagnet. The permanent magnet of the compass, the needle, begins to turn away from the conductor.
The conductor of a closed circuit becomes an electromagnet. The more we coil the conductor, the more powerful its electromagnetic effect becomes. The resulting conductor bundle is called a coil. Its strength can be increased further by inserting a bolt of iron (Fe) inside it.

On the left: The conductor of a closed circuit becomes an electromagnet. Electromagnets can be used to produce movement. When the circuit is closed, the conductor's electromagnet will begin to move the permanent magnet attached to the toy car. On the right: Electronic locks are opened with electromagnets. When the button is pressed, the circuit becomes closed, and the electromagnet releases the lock's clamp. This means that the door can be opened. When the button is not pressed, the metal spring returns the parts of the lock to their previous positions. This means that the door becomes locked.
Speakers also contain electromagnets. When the circuit of the speaker is closed, the electromagnet will pull the speaker's surface tight. When the circuit is opened, the speaker's surface is loosened. This back-and-forth movement releases vibrations that we hear as sound. The movement is caused by an electromagnet. A permanent magnet is contained inside the speaker's electromagnet.
The movement of an electric motor is also based on an electromagnet. The axle of the motor is rotated when the electric current is modified. The motor contains a permanent magnet and an electromagnet. These magnets are made to alternatively push and pull towards and away from each other. This makes the axle of the motor rotate.
All household electronic devices that produce some kind of movement, such as hair dryers and vacuum cleaners, contain at least one electric motor. 
On the left: The axle of an electric motor is rotated by a permanent magnet and an electromagnet. On the right: A small electric motor.