It is composed of a piece of silicon with a P-type dopant(Boron) on one side and a
piece of N-type dopant(Phosphorus) on the other side. It is called a PN junction
because it is a junction of N-type and P-type semiconductor. PN junction diode is a two-terminal device that allows electric current to flow in only one direction while blocking the electric current in the reverse or opposite direction.