Phosphorus atoms, which have five valence electrons, are used for doping n-type silicon (because phosphorous provides its fifth, free, electron).
A phosphorus atom occupies the same place in the crystal lattice that was occupied formerly by the silicon atom it replaced. Four of its valence electrons take over the bonding responsibilities of the four silicon valence electrons that they replaced. But the fifth valence electron remains free, without bonding responsibilities. When numerous phosphorus atoms are substituted for silicon in a crystal, many free electrons become available.
Substituting a phosphorus atom (with five valence electrons) for a silicon atom in a silicon crystal leaves an extra, unbonded electron that is relatively free to move around the crystal.
The most common method of doping is to coat the top of a layer of silicon with phosphorus and then heat the surface. This allows the phosphorus atoms to diffuse into the silicon. The temperature is then lowered so that the rate of diffusion drops to zero. Other methods of introducing phosphorus into silicon include gaseous diffusion, a liquid dopant spray-on process, and a technique in which phosphorus ions are driven precisely into the surface of the silicon.