Practical Electronics/Diodes
Function of a common diode

Light emitting diode - LED

Light emitting diodes emit light when a small current passes through them in the forward direction. They are manufactured in different shapes and colours:

Green, yellow, red, blue and white are the most common colors, but there are also multi-coloured LEDs (with 4 wires - red, green and blue component and cathode).
Every LED has a maximal current, which should not be exceeded. Therefore we must always put a resistor before the diode. A common LED uses 20 mA current. When using a 5 V source, we can compute the resistance R this way:
In this case, we would use 160 Ω.
Voltage drop on a LED is relatively high, between 1.5 and 2.5 V (generally this voltage increases going from red to blue).

The LEDs cannot be used for rectifying.
Avalanche and Zener diodes

Schottky diodes
Additional Reading
The Wikipedia article on diodes has further detail on the history, theory, and types of diodes.