P-N Junction
These are two pieces of semiconductors of P and N stuck together to form a P-N junction. This is the region where the two types of semiconductors meet.
The transistor has two junctions: one between the emitter and the base and the other is between the base and the collector.
The NPN transistor is like the PN diodes. The p-n junction forms a diode (the flow of electricity in one direction but not the opposite direction).
The movement of HOLES from the emitter to the base and to the collector results in the flow of electricity.
The N-doped conducts electricity and the same applies to the P-doped. The junctions between them, thus p-n junctions do not conduct electricity and this makes them to be used as DIODES.