2N2222 is an NPN BJT transistor. It is used for general purpose low-power amplification and switching applications. These are designed for high speed switching application at collector current up to 800mA. It provides useful current gain over a wide range of collector current. Other features include, low leakage currents and low saturation voltage. 2N2222A is another variant with improved characteristics.
The emitter leg of 2N2222 is indicated by a protruding edge in the transistor case. The base is nearest to the emitter while collector lies at other extreme of the casing.