Video narration
Why does a compass needle turn when you switch on a nearby wire? With current off, the needle points its usual way. Send current through the wire, and the compass shifts; its angle depends on where you place it. The wire is not just carrying electricity: current creates a magnetic field around it. Around a straight wire, that field forms circles. Reverse the current, and the field reverses, so the compass needle turns the other way. Use the right-hand thumb rule: point your right thumb along conventional current; your curled fingers show the field's direction. Coil the wire into loops. Each loop's field adds to the others, strengthening the combined field. Add an iron core, and the coil becomes an electromagnet-a magnet made when current flows through it. That's why switching on the nearby wire turns your compass needle: it responds to the field the current creates.