Transistors have three terminals: the gate, the drain, and the source (on a bipolar transistor, the wires can be called the emitter, the collector, and the base). When the source (or emitter) is connected to the negative terminal of the battery, and the drain (or collector) to the positive terminal, no electricity will flow in the circuit (if you have only a lamp in series with the transistor). But when you touch the gate and the drain together, the transistor will let electricity through. This is because when the gate is positively charged, the positive electrons will push other positive electrons in the transistor letting the negative electrons flow through. The transistor can also work when the gate is just positively charged, so it doesn't need to be touching the drain.
An easy way to think of how a transistor works is as a hose with a sharp bend that stops the water from going through. The water is the electrons, and when you positively charge the gate, it unbends the hose, letting water flow.
License information: CC BY-SA 3.0 and GFDL
MPAA: G
Go to source: https://simple.wikipedia.org/wiki/Transistor