A semiconductor diode is a P-N junction with metallic terminals at each end. It is one of the electrical components which are widely used in electronic circuits. The diode conducts electric current in only one direction.
The P-N junction is made up of P-type and N-type extrinsic semiconductors. When the P-terminal is connected to positive end of current supply, it is said to be forward-biased and allows current to pass through it. In the reverse condition it is said to be reverse-biased and does not allow current to pass through it.
A diode is a basic unit of almost all semiconductor devices. It is used in rectifiers, demodulating a AM signal, voltage-regulator (zener diode). It is also used in form of LEDs and photo-diode.
The basic principle is that a diode can bring logic in a circuit, to control amount of current, or to control direction of current.