A light-emitting diode (LED) is a semiconductor (electrical)device, that restricts current flow in one direction.Semiconductor diodes are comprised of two regions, one is p region(positive charges)and other is n region(negative charges). When voltage is applied, the electrons move across the n region into the p region. The process of an electron moving through the p-n junction releases energy.The dispersion of this energy produces visible light.