A semiconductor diode [fig1]is basically a p-n junction with metallic contacts provided at the ends for the application of an external voltage.It is a two terminal device.A p-n junction diode is symbolically represented as shown in fig2.

Fig. 1
Fig. 2
The direction of arrow indicates the conventional direction of current(when the diode is under forward bias).The equilibrium barrier potential can be altered by applying an external voltage V across the diode.
The situation of p-n junction diode under equilibrium [without bias] is shown in fig3[a]and [b].
Fig. 3[a]