How does a transistor work?

[Video Link] This is a good six-minute video that explains how transistors work. I liked the description of N- and P-type doping. (Via Adafruit)