The idea
A small turn of the handle controls a big flow of water. A transistor is the same idea for electricity: a small voltage on one pin controls a big current through the other two.
The circuit
A battery is a pump for electric charge. Its + side sits 1.5 volts above its - side. Voltage is the push; current is the flow of charge that the push causes.
Current needs a closed loop. Ours runs from the battery through a resistor, which limits the current, then a bulb, then the transistor, and back via ground. The transistor is off, so the loop has a gap.
This is an n-channel MOSFET, one of the two kinds of switch chips are built from. Current enters at the drain (D) and leaves at the source (S). The third pin, the gate (G), is the handle.
Switching
The gate dial is at 0 V. With no push on the gate there is no channel between drain and source, so the switch is open. No current flows and the bulb stays dark.
Turn the dial to 1.0 V. Once the gate passes the threshold voltage (Vth, about 0.4 V in a typical chip process), the switch closes and the bulb lights.
The side view cuts the transistor open. The gate is a plate on a very thin insulator. Its positive voltage pulls electrons into a thin layer just under it: a channel joining source and drain. Almost no current crosses the insulator.
Now the loop is closed. Current flows from the battery through the resistor, the bulb and the channel, and back via ground. A tiny push on the gate controls this much bigger flow, just like the tap.
Turn the dial back to 0 V. The channel disappears, the current stops and the bulb goes dark. Nothing moved: a voltage alone flipped the switch, which is why transistors are fast and last for years.
Bigger picture
A p-channel MOSFET works the other way round. Here its source sits at +1.0 V and its gate is pulled low, to 0 V, below the source: it is on and its lamp lights. Chips pair both kinds; the pairing is called CMOS.
Computers read a high voltage as 1 and a low voltage as 0. So one transistor is a switch for one bit: gate 1, switch on; gate 0, switch off. Wire switches together and you get logic.
Chip transistors are far smaller than this drawing. Apple's M1 chip, from 2020, packs 16 billion of them. Every app you use is these switches turning on and off.
In detail
;; step 1/12 · tap Analogy handle -> gate (the small control) water -> current (the big flow) pipe in -> drain, pipe out -> source Unlike a tap, nothing in a transistor moves: it is switched by voltage alone.
The board circuit is a teaching model: the 1.5 V cell, the bulb and the 0 V / 1.0 V gate settings show the idea and are not taken from one datasheet. Threshold values: NMOS 0.43 V and PMOS -0.4 V for the generic 0.25 µm CMOS process in MIT 6.374 (after Rabaey, Chandrakasan and Nikolić, Digital Integrated Circuits). The exact value depends on the process and the device. Below the threshold a real transistor is not perfectly off: a small leakage current still flows. This lesson treats it as zero.