The short answer

The switch closes the circuit, and the battery supplies the energy. When the flashlight is off, a gap breaks the path through the bulb. Click it on and two metal contacts touch. The battery’s voltage can now drive current around the loop. In a filament bulb, electrical energy heats a fine wire until it glows. In an LED, a tiny chip turns some of that energy into light.1245

What changes at the click?

I point my flashlight at the wall. The switch is off and the wall stays dark. The battery is already in place, with a voltage between its two metal ends, called terminals. That voltage tells you how much energy is available to transfer for a given amount of electric charge. So what changes when I click the switch?12

Two metal contacts inside this flashlight are separated by a gap. The gap makes it an open circuit, so there’s no steady flow of charge through the bulb. Click. The contacts touch. Now the circuit is closed, and the charge has a continuous path.14

Follow the metal all the way back

Start at the battery’s flat, negative end. A spring touches it, and a metal strip links the spring to the switch. Across the joined contacts, a second strip leads to the bulb. The path goes through the filament, the thin wire inside the bulb, and back to the battery’s raised, positive end. Inside the battery, ions, or electrically charged particles, move through a material called the electrolyte. Their movement carries charge through that part of the loop.134

The bulb can start to glow long before a single electron has drifted from the spring to the filament. The metal already contains electrons that can move. When the switch closes, a change in the electric field spreads quickly through the circuit and sets the electrons already in the filament drifting. The charge flows in one direction around this circuit. That’s direct current, or DC.24

Where does the light get its energy?

The energy for that glow comes from chemicals inside the battery. As they react, they maintain the voltage that drives current around the loop. The electric field pushes electrons through the filament. As the electrons collide with atoms in the wire, they transfer energy to the metal. The filament heats up until it glows, and the reflector directs some of that light forward. There’s your bright spot on the wall.1234

An LED flashlight gets its energy from the battery, too. Inside its tiny chip, electrons settle into spots where electrons are missing. Some of the energy released comes out as light. I click the switch off again. The gap reopens, cutting off power to the bulb. The light goes out even though the battery still has energy to give.1245