A transistor is a three terminal device consisting of 3 layers of semiconductor material. Two of them are one type of semiconductor and the third, a different type. For example, a PNP transistor consists of 2 layers of P type semiconductor and a layer of N type semiconductor. We can also have NPN type transistor. The three terminals are respectively referred to as emitter, base and collector.
Transistors are widely used electronic components that perform the function of a switch or an amplifier. The semiconductor material used in transistors is generally silicon, germanium or gallium arsenide. Impurities are added to them in order to create electrically positive (P) or electrically negative (N) behavior. When these layers are joined together the contact potential creates a potential barrier across the PN or NP junction. This potential barrier maintains electrons on the N side and holes on the P side. This property of transistor allows it to be used as a rectifier i.e. allow current to flow in only one direction. When the P side is made positive by an applied field, the barrier height is lowered and most of the electrons from the N side flow to the P side and most of the holes flow to the N side. The transistor is said to be forward biased in this case. When the applied field makes the P side negative, the barrier height is increased and only a leakage current can flow through the transistor. The transistor is said to be reverse biased in this case.
A transistor can also function as an amplifier. When a small input current is applied to the base-emitter of a PNP transistor, it gets amplified and a larger current results in the collector-emitter circuit. A typical application of a transistor as a vital electronic component is in a radio wherein weak radio signals from an antenna are amplified into stronger signals identifiable by human ear by a transistor.