What is a Light Emitting Diode?
(excerpted from www.lrc.rpi.edu/Ltgtrans/led/leds.htm)

LEDs are solid-state semiconductor devices that convert electrical energy directly into light. Thermal sources of light  such as flames and incandescent filaments emit light when heated, either by chemical reaction (flames) or electrical heating (filament lamps). LED "cold" generation of light  leads to high efficacy because most of the energy radiates  within the visible spectrum. Other common high efficiency light sources, such as fluorescent lamps and electroluminescent devices, also produce light without much thermal radiation outside the visible spectrum. Because LEDs are the solid-state devices, they can be extremely small and durable; they also provide longer lamp life than other sources.

Figure 1 shows a schematic of a typical LED. The plastic encapsulant and the lead frame occupy most of the volume. The light-generating chip is quite small (typically 0.25 millimeter square).

Light is generated inside the chip, a solid crystal material, when current flows across the junctions of different material compositions. The composition of the different materials determines the wavelength and therefore the color of light  generated. The device shown in Figure 1 is an AlGaInP LED because the semiconductor layers are aluminum (Al), gallium (Ga), indium (In), and phosphide (P). Different compositions of AlGaInP produce light in colors from yellow-green to red.