When a current is passed through the wire, a magnetic field is produced, which then interacts with the magnetic field from the permanent magnets. This causes the wire to turn.

12