How diode works
Define :
Diode is an electrical appliance that allow to flow current in one direction .
#fig source google
Types of diode:
1:NPN
2:PNP
--->There are two possibilities of diode to connecting with circuit.
1: Forward Bise
In forward bise polarities of diode such like that anode of diode connected with positive terminal of the battery and cathode of the diode connected with negative terminal of the battery .
2: Reverse Bise
In reverse bise anode of the diode connected with negative terminal of the battery while cathode of the diode connected with positive terminal of the battery .
Current Direction:
Diode allows to flow current when it connected in forward bise while in reverse it does not allow to flow current .
Potential barrier :
The potential barrier of the diode is 0.7V it mean less the 0.7v(for si diode 0.7v ge 0.3v) volt it will not allow to flow current in it .
Structure of the Diode:
#fig source google
Depletion Region:
In above fig the mid region is call depletion region who's potential as above i discuss 0.7v for silicon diode .
p-type:
In above fig the left side is p-type ,p-type consist of whole (+)positive majority charge carrier .
n-type:
In above fig the right side of the diode is n-type which consist of (-)negative majority carrier mean electron.
i hope you will understand well what is diode and how its works . THANK YOU BEST WISHES!