The current in the electromagnet is interrupted by the action of the switch .
The switch continually switches rapidly back and forth .
The current in the electromagnet is interrupted by the action of the switch so that the switch continually switches rapidly back and forth .