If you want the background on this, and it's done in both an entertaining and informative way, check out Empire of the Air. It was a documentary by Ken Burns and there's a book version by Tom Lewis. The book goes into more detail but I highly recommend either of them.
The highly simplified abstract version is this. There was a young electrical engineer named Lee DeForest, who wanted to make his mark on the world. At this time, tubes were the cutting edge of electrical technology, and DeForest experimented with them.
One of the things DeForest tried was adding another electrode—a third element, which was placed between the cathode and the plate, and this third element would eventually become known as the control grid, or grid for short.
DeForest found that if you put a positive charge on the grid, you'd get a small current and whether that was useful or not remained to be seen. But if you put a negative charge on the grid, it reduced the cathode-to-plate current, and it did it dramatically. A small change in negative voltage (with respect to the cathode) made a big difference in the plate current; and there was leverage at work too: the closer the grid was to the cathode, the more effect that small negative charge would have.
The British call vacuum tubes "valves" because they work with valve action. Fleming's version acted as a check-valve, letting current pass in one direction. DeForest's acted as an adjustable valve; the higher the negative charge on the grid, the less current flow through the tube.
So in effect, DeForest invented a variable resistor that could be adjusted using electricity, rather than by mechanical means. Controlling electricity with electricity is what changed electrical into electronics. He also made what became known as an active component, rather than a passive one.
DeForest eventually called his tube the Audion; engineers eventually called the three-element configuration a triode. A diode has two active elements (cathode and plate), a triode has three (cathode, plate and grid), a tetrode has four, a pentode has five, a heptode six, and so on.
The triode is the basis for the majority of other tube types; the concept of using a grid voltage to vary a cathode-to-plate current shows up almost everywhere—even television picture tubes.
Triodes can act as binary switches in computers (if a current flows, it's on; if the current is cut off, it's off), but triodes almost always used as amplifiers of some sort. If a tube normally a small internal cathode-to-plate current (typically called the plate current), the tube acts as a voltage amplifier; when the tube can handle a heavy current, the tube acts as a power amplifier. Voltage amplifiers are typically used to build up weak signals; power amplifers are typically used to drive speakers.
Nearly all of the early tubes had the grid electrode on the top of the glass envelope, rather than on the bottom near the filament and plate pins; this reduced interference and unwanted capacitance. The top of the grid electrode typically connected to a metal cap; RCA books call them grid-caps; service men often called them tin hats. Tubes with grid caps are called double-ended tubes.
Beginning with the octal-style tubes in the late 1930s, double-ended tubes were re-engineered to that the grid was always on a pin at the base of the tube. Tubes without grid-caps are called single-ended tubes. Many of the older double-tended tubes ended up with a single-ended equivalent: the 6G7, double-ended, became the 6SG7, a single-ended tube.
As I mentioned earlier, triodes are primarily amplifiers. There are a number of ways of classifying or rating them, but here are some of the most common:
amplification factor - this is how much the plate voltage changes depending on the change of grid voltage. i.e. if a 5 volt change in grid voltage changes the plate voltage by 100 volts, that's an amplification factor of 20. Obviously, the higher the amplification factor, the more effective the tube is as an amplifier.
mu - another way of expressing amplification factor. In tube literature, amplification tubes are typically described as low-mu (amplification factor less than 10), medium-mu (between 10 and 50) and high-mu (greater than 50)
transconductance (aka mutual conductance) - this is the amplification factor divided by the plate resitance. As this is a unit of conductance, modern literature uses the term Siemens; older literature uses term mhos (a mho is an ohm spelled backward). I.e. a 12AX7 tube has an amplification factor of 100 and a plate resistance of 62,500 ohms (at 250V); so the transconductance is 0.0016 mhos, or 1,600 micromhos (microSiemens if you prefer). Transconductance is commonly measured on tube testers.
For more, see my page of common terms.
Earlier I mentioned that there are tubes with more than three elements. Let's take a look at the next big development, the tetrode.