The PN Junction acts as a barrier to the flow of electrons between the N and the P regions. When proper voltage is applied to the semi-conductor chip, the current will flow and the electrons from the N region will cross the junction. As electrons cross the junction, energy is released in the form of light.