A P-type semiconductor (P for Positive) is obtained by carrying out a process of doping, that is adding a certain type of atoms to the semiconductor in order to increase the number of free charge carriers (in this case positive).
When the doping material is added, it takes away (accepts) weakly-bound outer electrons from the semiconductor atoms. This type of doping agent is also known as acceptor material and the semiconductor atoms that have lost an electron are known as holes.
The purpose of P-type doping is to create an abundance of holes. In the case of silicon, a trivalent atom (typically from group IIIA of the periodic table, such as boron or aluminium) is substituted into the crystal lattice. The result is that one electron is missing from one of the four covalent bonds normal for the silicon lattice. Thus the dopant atom can accept an electron from a neighboring atoms' covalent bond to complete the fourth bond. Such dopants are called acceptors. The dopant atom accepts an electron, causing the loss of half of one bond from the neighboring atom and resulting in the formation of a "hole". Each hole is associated with a nearby negative-charged dopant ion, and the semiconductor remains electrically neutral as a whole. However, once each hole has wandered away into the lattice, one proton in the atom at the hole's location will be "exposed" and no longer cancelled by an electron. For this reason a hole behaves as a quantity of positive charge. When a sufficiently large number of acceptor atoms are added, the holes greatly outnumber the thermally-excited electrons. Thus, the holes are the majority carriers, while electrons are the minority carriers in P-type materials. Blue diamonds (Type IIb), which contain boron (B) impurities, are an example of a naturally occurring P-type semiconductor.