A switch worked by a voltage
A light switch closes a gap between two pieces of metal: your finger moves something. A transistor closes a gap with a voltage instead. Raise the voltage on one of its three legs, the gate, and current flows between the other two, the source and the drain. Lower it and the current stops. A small voltage, drawing no current at all, controls a much larger current through something else, here a bulb on a 9 volt battery.
Inside the transistor
The kind in the scene, the commonest in the world, is a MOSFET: metal–oxide–semiconductor field-effect transistor. It starts as a block of p-type silicon, a trace of boron giving it a supply of holes, gaps in its bonds that move like positive charges. Into its surface go two wells of n-type silicon, rich in free electrons: the source and the drain.
Between the wells lies a short stretch of p-type silicon, and that is the gap. Electrons from the source cannot cross it, because the p-type silicon has almost no free electrons to carry them, so with the gate at zero no current flows and the bulb stays dark.
Over the gap, separated from it by a film of glassy silicon oxide, sits the gate. The oxide is an insulator, so the gate never touches the silicon. It acts on it from a distance, through its electric field.
Drawing a channel
Put a positive voltage on the gate and its charge pushes holes away from the surface beneath it and pulls electrons towards it. At first that only clears a thin layer of holes. Past a certain voltage, the threshold, so many electrons gather that a thin sheet just under the oxide turns n-type. This sheet, the channel, joins source to drain, and current flows.
Try it: set Gate voltage to 2 V, just past the threshold, and choose Channel under Zoom to the channel. Notice the channel thinning towards the drain. Then slide Gate voltage up to 5 V and compare the meter.
Just past the threshold the channel is thin and the transistor itself limits the current, which rises with the square of how far the gate is above the threshold. The channel also thins towards the drain, where the battery’s voltage works against the gate. Raise the gate further and the channel thickens until the transistor drops only a fraction of a volt. It is now a closed switch, and the bulb alone decides the current.
From one switch to a computer
A switch that one voltage turns on can drive the gate of the next switch. Wire a transistor so that a high voltage at its gate pulls its output low, and you have a NOT gate: on in, off out. Two transistors in series conduct only when both gates are high, an AND; two side by side conduct when either is, an OR. From such gates you can build circuits that add binary numbers, compare them and store them, and from those, a processor.
Real chips pair n-channel transistors with p-channel ones, which switch the opposite way, so that almost no current flows except at the moment of switching. A modern processor holds billions of transistors on a sliver of silicon the size of a fingernail, each gate tens of nanometres long. They can switch billions of times a second because nothing has to move except a thin sheet of electrons.
What this model leaves out
The scene is magnified enormously and not to scale. A real gate oxide is a few nanometres thick, a handful of atoms, and the channel is thinner still. The electrons and holes are drawn far fewer than there are.
The current follows the simple square law taught in textbooks; real transistors depart from it in short channels and at high fields, and a small current leaks through even below the threshold. The bulb is treated as a fixed resistance, though a real filament’s resistance rises as it heats. The tiny current that charges the gate when its voltage changes is not shown: once charged, the gate draws none.
