A coil of wire carrying a current in a magnetic field experiences a force that tends to make it rotate. This effect can be utilised in an electric motor.
The diagram shows a simple motor using direct current (dc).
Starting from the position shown in the diagram of the dc motor:
When the coil is vertical, it moves parallel to the magnetic field, producing no force. This would tend to make the motor come to a stop, but two features allow the coil to continue rotating:
Once the conducting brushes reconnect with the commutator after a half turn:
This means that the motor effect forces continue to cause anticlockwise rotation of the coil.