Diodes are two terminal devices that conduct very differently in one direction verses another. The basic use takes advantage of this property, but the are other characteristics that are also useful and special diodes that take advantage of these properties.
How They Work
At the most basic level, diodes allow current to flow in one direction and prevent current from flowing in the opposite direction. If we take a look at their construction, we can see why this occurs.
Diodes consist of two dissimilar materials that come together at a joint. One material has an abundance of electrons and therefore is negatively charged, while the other lacks electrons and is positively charged. At the junction between the two materials, electrons in the first material are attracted to the electron-less second material, forming a neutral atoms at the center of the junction which act as an insulator.
When current is applied backwards, that is, to the electron-lacking side, electrons in the wire are attracted to the material, pulling it away from the junction. There is a similar effect on the other side, as electrons in the other material are attracted to the electron-lacking atoms in the wire.
If current is applied to the side with an abundance of electrons, the electrons in the wire repel the electrons in the material, pushing the insulating atoms away from the junction. As the atoms are pushed further and further, the diode will get to a state where it begins conducting current.
Diodes can do many different things. They can detect, rectify, suppress, emit light, change capacitance, emit microwaves, etc.
As a Rectifier
Changing alternating current to direct current. A standard in almost all plug in power supplies and most electronic circuits run on DC. Application Note Vishay General Semiconductor
As a Detector
As in an amplitude modulated radio ( AM ) where the radio signal is changed to an audio signal.
As a Snubber
Some circuits, typically those with inductance like inductors, motors, relays and solenoids, generate a large back or reverse voltage when they turn off. Often a diode will be inserted to "short circuit" this voltage/current. This can prevent damage to other circuit components.
As an Exponential/Logarithmic Converter
The current in the forward direction is an exponential function of the voltage. Together with an op amp this can be used to convert voltages to via an exponential or logarithmic function. These in turn can be used for multiplication, division, powers and roots. See OpAmp Links
Clipping, Bias Voltage ( Temperature Sensing )
In the forward direction a junction has about .6 volts when conducting ( as does the base emitter junction of a bipolar transistor ). This voltage is useful as a small well defined voltage for bias in a transistor circuit. Often 2 or more will be used in series for a higher voltage. If the input is a varying voltage the output is equal to the input and then begins to clip ( stop rising ) at about .6 volts. Feeding in a triangle wave at the right amplitude you get out a triangle wave with the points rounded off, an approximate sine wave. The bias voltage is somewhat temperature sensitive, you can used this in an electronic thermometer circuit.
Over Voltage Protection
Many circuits cannot tolerate voltage over a certain limit ( often the power supply voltage ). Connecting a diode from the circuit input to the power supply can "short out" the over voltage. Make sure the diode is connected in the proper direction.
This is an arrangement that is used for full wave rectification and some other circuits that are a bit tricky. Not explained here and now but Google will help you out
Many circuits destroy themselves when connected backwards to a voltage source. Connecting a diode in series with the circuit blocks the reverse voltage. See Reverse Protection Diodes.
Diodes and resistors can be used to produce high voltages from AC without transformers. See Using Rectifiers in Voltage Multiplier Circuits Application Note Vishay General Semiconductor. We should have a voltage doubler in our basic circuits section, do we?