Phosphorus, #"P"#, is located in period 3, group 15 of the periodic table, which means that it has #5# valence electrons.
Now, an isolated phosphorus atom in its ground state can only use #3# valence electrons to form bonds because the other #2# are paired together in the #3s# orbital.
This is why phosphorus is said to have a valency of #3#.
However, phosphorus can promote an electron from the occupied #3s# orbital to an empty #3d# orbital. In this excited state, the phosphorus atom has #5# half-filled orbitals in its outermost energy level, i.e. its third energy level.
These orbitals will hybridize to form #5# #"sp"^3"d"# hybrid orbitals, which as their name suggests are formed from
- the 3s orbital
- the three 3p-orbitals
- one 3d-orbital
The atom can now form five covalent bonds with five chlorine atoms to form phosphorus pentachloride, #"PCl"_5#.
Phosphorus is able to promote an electron to one of its #3d# orbitals because the favorable ratio between the energy cost associated with promoting this electron and the energy gain that results from the formation of the five covalent bonds.
In other words, promoting this electron to a #3d# orbital and forming the five covalent bonds puts the phosphorus atom is in an energetically favorable position.