LED stands for light emitting diode. It has a PN junction just like a normal diode, but when it is forward biased, it can emit infrared light up to blue light. The color of the light given off from an LED is not from the plastic surrounding it. It is actually from the difference of energy levels between the P-type and N-type crystals in the diode. An N-type crystal has a higher energy level than a P-type crystal. When electrons flow through the higher energy level N-type crystal, and then cross the junction to the lower energy P-type crystal, energy is released in the form of light. The larger the energy difference between the N-type and P-type crystals, the higher the energy of the light given off. Because low frequency light has a low energy level, an LED with a small energy drop will give off infrared. And an LED with a large energy drop will give off blue, which has a higher frequency.
LEDs are used for many things such as indicator lights, and a means of transmitting information, such as in fiber optics, and remote controls. Laser diodes are used for things like CD-ROMs and laser pointers. And because the current input is almost linear to the light output (after about 0.8 volts, which is when it starts conduction), you can transmit voice and sounds with little distortion.
Some LEDs are shown above. Some LEDs, such as the one on the far right, are bi-color.
This means it gives off two colors. This particular one gives off red and green. The
center lead is the cathode of both the red and green chips, so this is a common cathode.
The outer two leads are the anodes to the red and green. LEDs can contain more colors
too. I have an 8 color (octal-color?) LED, that contains one red, one green, and two blue
chips. Depending on what chips are turned on, and to what intensity, different colors can
be produced.