When a current-carrying wire is put between magnetic poles, the magnetic field around the wire interacts with the magnetic field it has been placed in. This causes the magnet and the conductor to exert a force on each other. This is called the motor effect and can cause a wire to move