The 2N3904 is an extremely popular NPN transistor that is used as a simple electronic switch or amplifier that can handle 200 mA (absolute maximum) and frequencies as high as 100 MHz when used as an amplifier.
Figure 1: An illustration of the pin out of a standard TO-92 package for Digi-Key part number 2N3904FS-ND: E = Emitter, B = Base, C = Collector.
Figure 2 shows a circuit example which turns on the collector emitter junction by energizing the base or biasing the transistor to turn it on by bringing 5 volts to the base via a slide switch. This example lights an LED which is considered to be the load in this case. The proper use of resistors to prevent over current draw is required when biasing the base. I used leaded parts in a bread board to test my example circuit. Most engineers will use surface-mount components (much smaller size then a TO-92 package) when it comes to using transistors in a new product design going to market. Here is a link that shows various package sizes for 3904 transistors.
Figure 2: 2N3904 circuit example - drawn in Scheme-it®.
Since the 2N3904 is an NPN transistor, that means the base needs positive biasing (appropriate voltage levels and resistance) to turn on the collector emitter junction for proper current flow. Use of a load resistor (R1 above) is also important so there is not too much current being driven through the LED and transistor. For the complete specifications on the 2N3904FS-ND, see the On Semiconductor datasheet associated with this part.