P and n type semiconductors are dop ed semiconductors or extrinsic semiconductors. Extrinsic semiconductors are different from intrinsic semiconductors like Silicon, Germanium etc.
Intrinsic semiconductors contain equal number of electrons or holes (atoms with missing electrons). The rate of thermal generation of free electrons and holes matches with the recombination of electrons with holes back to neutral atoms.
Extrinsic or impurity semiconductors are made by adding dopants to intrinsic semiconductors. Silicon and Germanium are tetravalent. We add only a few atoms of Arsenic or Antimony, Phosphorous (nearly the same atomic size as Si or Ge). Then due to pentavalency of P or Ar or Sb, we have more electrons than before in the semiconductor. This becomes n-type semiconductor with some negative charge. The ionization energy required for the dop ed n-type semiconductor is very less and it becomes a conductor easily.
When we add some trivalent atoms like Indium, Boron or Aluminium into Si or Ge, then the number of free electrons available for conduction will become less and number of holes becomes more than before. After doping Si or Ge becomes the p-type semiconductor.
In a p type semiconductor the holes are majority carriers and in a n-type semiconductor the electrons are majority carriers.