A transistor is really a simple amplifier. A small amount of current flowing from the base to the emitter will allow a larger amount of current to flow from the collector to the emitter. In most of the robot projects it is used as a switch so that a small current generated by the processor can allow a larger current to flow through a motor or a LED etc.
As mentioned before by Voodoobot, check the pin connections as they vary depending on the type of transistor. Also check if you are using NPN or PNP transistors as the polarity is reversed.
FETs (field effect transistors) are very similar but need a voltage between the gate and the source to turn them on rather than a current from base to emitter. They also have a lower "on resistance" that allows them to handle more current without getting hot.
Always look up the datasheet as the pin layout could possibly be different. just lookup the code, say like 2n3904.
This is a helpful page as well.
I've mainly used mine as switches to increase the current flow vs a uProc pin that is usually rated very low.
I always look at transistors as a way to separate voltage flow from the delicate controls.
But yeah, google will explain it much better than I can blabber on about :P