What's the difference between DC and AC electricity?
When science teachers explain the basic idea of electricity to us as a flow of electrons, they're usually talking about direct current (DC). We learn that the electrons work a bit like a line of ants, marching along with packets of electrical energy in the same way that ants carry leaves. That's a good enough analogy for something like a basic flashlight, where we have a circuit (an unbroken electrical loop) linking a battery, a lamp, and a switch and electrical energy is systematically transported from the battery to the lamp until all the battery's energy is depleted.
Diagram: When we think of electricity as a flow of electrons, we're usually picturing DC (direct current) in our minds.
In bigger household appliances, electricity works a different way. The power supply that comes from the outlet in your wall is based on alternating current (AC), where the electricity switches direction around 50–60 times each second (in other words, at a frequency of 50–60 Hz). It can be hard to understand how AC delivers energy when it's constantly changing its mind about where it's going! If the electrons coming out of your wall outlet get, let's say, a few millimeters down the cable then have to reverse direction and go back again, how do they ever get to the lamp on your table to make it light up?
The answer is actually quite simple. Imagine the cables running between the lamp and the wall packed full of electrons. When you flick on the switch, all the electrons filling the cable vibrate back and forth in the lamp's filament—and that rapid shuffling about converts electrical energy into heat and makes the lamp bulb glow. The electrons don't necessarily have to run in circle to transport energy: in AC, they simply "run on the spot."