Transistor & Its different function:
Transistor:

A transistor is a semiconductor device used to amplify or switch electronic signals and electrical power.
It is composed of semiconductor material usually with at least three terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals controls the current through another pair of terminals. Because the controlled (output) power can be higher than the controlling (input) power, a transistor can amplify a signal.
Transistor Symbols and Pins:
Transistors are fundamentally three-terminal devices. On a bipolar junction transistor (BJT), those pins are labeled collector (C), base (B), and emitter (E). The circuit symbols for both the NPN and PNP are shown.
The only difference between an NPN and PNP is the direction of the arrow on the emitter. The arrow on an NPN points out, and on the PNP it points in.
Transistor Structure and Operation:

Transistors are built by stacking three different layers of semiconductor material together. Some of those layers have extra electrons added to them (a process called "doping:), and others have electrons removed (doped with "holes" in the absence of electrons).
A semiconductor material with extra electrons is called an n-type (n for negative because electrons have a negative charge) and material with electrons removed is called a p-type (for positive).
Advantages of transistors:
1) No cathode heater, reducing power consumption, eliminating delay as tube heaters warm up, and immune from cathode poisoning and depletion.
2) Very small size and weight, reducing equipment size.
Large numbers of extremely small transistors can be manufactured as a single integrated circuit.
3) Low operating voltages are compatible with batteries of only a few cells. Circuits with greater energy efficiency are usually possible. For low-power applications (e.g., voltage amplification) in particular, energy consumption can be very much less than for tubes.
4) Complementary devices are available, providing design flexibility including complimentary symmetry circuits, not possible with vacuum tubes.
5) Very low sensitivity to mechanical shock and vibration, providing physical ruggedness and virtually eliminating shock-induced spurious signals (for example microphonic in audio applications).
6) Not susceptible to breakage of a glass envelope, leakage, outgassing, and other physical damage.
Limitations of transistors:
1) Silicon transistors can age and fail.
2) High-power, high-frequency operation, such as that used in over the air television broadcasting is better achieved in vacuum tubes due to improved electron mobility in a vacuum.
3) Solid-state devices are susceptible to damage from very brief electrical and thermal events, including electrostatic discharge in handling; vacuum tubes are electrically much more rugged.
4) Sensitivity to radiation and cosmic rays (special radiation-hardened chips are used for spacecraft devices).
5) Vacuum tubes in audio applications create significant lower-harmonic distortion, the so-called tube sound, which some people prefer.
Thank You