For example, when silicon (Si), having four valence electrons, needs to be doped as a p-type semiconductor, elements from group III like boron (B) or aluminium (Al), having three valence electrons, can be used. The latter elements are also called trivalent impurities. Other trivalent dopants include indium (In) and gallium (Ga).
When substituting for a Si atom in the crystal lattice, the three valence electrons of boron form covalent bonds with three of the Si neighbours but the bond with the fourth neighbour remains unsatisfied. The initially electro-neutral acceptor becomes negatively charged (ionised). The unsatisfied bond attracts electrons from the neighbouring bonds. At room temperature, an electron from a neighbouring bond will jump to repair the unsatisfied bond thus leaving a hole (a place where an electron is deficient). The hole will again attract an electron from the neighbouring bond to repair this unsatisfied bond. This chain-like process results in the hole moving around the crystal able to carry a current thus acting as a charge carrier.