In simple language, a diode is like one-way valve which allows electric current to flow in one direction but generally does not allow it to flow in the opposite direction. The direction of the electric current in the diode may be reversed. However, even if it is, the flow will still be one directional.
A diode contains two electrodes that act in much the same manner as semiconductors. The positive or p-type is usually the anode and the negative or n-type is the cathode. In other words, the cathode is negatively charged as compared to the anode. If the cathode is charged at the same or very similar voltage to the anode, current will not flow.
In electronics, a diode acts similarly to charge carriers. Diodes can also be compared to check valves or switches. If liquid or water were involved instead of current, it would essentially be similar to water flowing upstream or downstream. Put simply, a diode tends to allow for upstream to downstream flow but not the other way around.
To alter the direction of the flow, the cathode must be charged at a greater voltage than the anode. This is known as avalanche voltage, but despite the name, it does not always require a large number of volts to change the direction. It can in fact be a difference of only a few volts.
A diode can convert electric current from AC to DC or from Alternating Current to Direct Current. This is called rectification, and rectifier diodes are most commonly used in low current power supplies. A switching diode is most often used to turn a circuit on or off, and band switching diodes are used for switching high frequency band signals. A Zener diode is known as a constant voltage diode, due to the fact that even if power supply voltage varies, the Zener voltage remains at a constant level. A Schottky barrier diode, when used for high speed switching rather than basic rectification, is used for things like UHF and other high frequency signals.
A diode can be used for various purposes including the production of different signals such as an analog signal, frequencies such as microwave frequencies, or light. Those that produce light are known as Light Emitting Diodes or LED. This type of diode will produce light when current flows through it. LED are used for things like lighted elements in computer systems, clocks, displays on microwaves and electronics, solar lighting, and even some of the more modern designs in Christmas lights.