how transistors work
Shortphuse wrote a good blog entry about transistors. You can see that here: http://www.circuit-hut.co.uk/Transistors-blog<
In addition to that post I would like to add the following.
How a transistori works as a switch.
A transistor is basically an electronic switch, but because of how the transistor works it also allows signals to be amplified.
Transistors are used as switches for high current applications such as power supplies and also low power applications such as logic gates, where the output needs to be 1 (on) or 0 (off)