The Diode:
Whenever wafers of n-type and p-type material are in physical contact, the outcome is a p-n junction with certain properties. Figure below shows the electronic symbol for a semiconductor diode. The n-type material is symbolized by the short, straight line in the symbol and is the cathode. The p-type material is symbolized by the arrow and is the anode.
Figure: Anode and cathode representation for a diode.
In a perfect diode, electrons flow in the direction opposite the arrow though cannot flow in the direction the arrow points. When a battery and resistor are related in series with a diode, current flows when the cathode is negative relative to the anode (figure 'a' is shown below) though does not flow when the battery is reversed (figure 'b'is shown below ). This is an illustration of something with which you must by now be familiar: the idealized scenario! In the real world, diodes can approach though never achieve this state of perfect one-way conduction.
Figure: (a) Forward bias of diode outcomes in a flow of current. (b) Reverse bias generally generates near-zero current.