If electric current flows in a coil, it experiences a force and moves. Spinning a magnet in a coil of wire generates electricity. Transformers change the size of alternating voltages.
A simple electric motor can be built using a coil of wire that is free to rotate between two opposite magnetic poles. When an electric current flows through the coil, the coil experiences a force and moves.
The direction of the current must be reversed every half turn, otherwise the coil comes to a halt again. This is achieved using a conducting ring split in two, called a split ring or commutator. A coil of wire is used with lots of turns to increase the effect of the magnetic field.
Speakers contain both a permanent magnet and an electromagnet. The positive pole of the electromagnet is attracted to the negative pole of the magnet. This pulls the speaker coil towards the magnet. When the direction of the current in the electromagnet is reversed, the negative pole of the electromagnet now repels the negative pole of the magnet moving the coil away from the magnet. The coil is connected to the speaker cone, which moves with it creating vibrations in the air in front of the speaker. This is the sound we hear.