A changing current in the primary coil produces a voltage in the secondary coil. This occurs at the instant the switch makes or breaks contact.
This animation requires Apple's Quicktime 3.