<span>N-type
semiconductor materials have been with elements which have spare
electrons in their outer shells. This gives N-type silicon free
electrons (which are negatively charged partials) which can move about
at will - with the potential to create current.
P-type semiconductor materials have been in the opposite way, with
elements that have too few electrons in their outer shells. Therefore
the opposite of electrons - holes - are free to move about within the
material - with the potential to create current.
You can think of it like positive and negative poles of a magnet.
When you place a piece of N-type silicon next to a piece of P-type
silicon, they form a diode. The excess electrons in the N-type are
attracted to the excess holes in the P-type, forming what is known as a
P-N junction. If you then put a potential difference (voltage) across
the junction such that the P-type is sufficiently higher potential than
the N-type, electrons will be able to jump across the boarder from the
N-type to the P-type, creating current in the opposite direction.
If you apply the potential difference in the opposite direction, such
that the N-type is at a higher potential than the P-type, there is no
flow of electrons from the P to the N-type because the N-type already
has too many. There is no current flow. </span>