What is NPN transistor

NPN transistor structure : 

The transistor in which one p-type region is placed between two n-type regions is known as the NPN transistor. The p region has access to 'holes' mobile carrier of positive charge, and n region has access of electrons mobile carrier of negative charge. The charge carriers diffuse and some electrons fall into p-type holes are fitted with n-type electrons. This leaves some atoms with a negative charge in the p region, and some atoms with a positive charge in the n region. The atoms are fixed in place and they are charged but mobile is not charged. This creates a potential for space charge between regions, which forces mobile carriers near the junctions between regions away from the junction, leaving depletion layers at the junctions without mobile carriers.

NPN potential barriers : 

Since they do not have mobile charge carriers, the depletion layers are insulators, potential barriers. If you bias a positive n region with respect to the p region adds to the potential for space charging and increase the barrier potential and no current flows. So region n is called a collector. 

p region is called as a base because one way of making an NPN transistor starts with p material and n material are diffused into it to make other regions.

NPN transistor works : 

Electrons at the base are in a potential field that attracts them to the collector. Most of these electrons are collected due to the proper design, leaving only a few to flow out of the base connection. The proportion of collected electrons out of emitted electrons is called as an alpha. 

NPN transistor current gain : 

The overall effect of NPN transistor is that a small base current controls a much larger collector current. If we take the emitter current as 1, the collector current is alpha, and the base current is 1 - alpha. This is known as Kirchoff's Current Law. The current gain from base to collector called beta which is alpha / (1-alpha). 

If alpha is 0.95 beta is 0.95 / 0.05 = 19 ( a very poor design )
If alpha is 0.99 beta is 0.99 / 0.01 = 99 ( ok design )
If alpha is 0.999 beta is 0.999 / 0.001 = 999 ( Excellent design )