Step 1:
In an isolated gaseous state, all the five d orbitals of the central metal ion are degenerate. Initially, the ligands form a spherical field of negative charge around the metal. In this filed, the energies of all the five d orbitals will increase due to the repulsion between the electrons of the metal and the ligand.

Step 2:
The ligands are approaching the metal atom in actual bond directions. To illustrate this let us consider an octahedral field, in which the central metal ion is located at the origin and the six ligands are coming from the +x, -x, +y, -y, +z and -z directions as shown below. As shown in the figure, the orbitals lying along the axes dx2 -y2 and dz2orbitals will experience strong repulsion and raise in energy to a greater extent than the orbitals with lobes directed between the axes (dxy , dyz and dzx). Thus the degenerate d orbitals now split into two sets and the process is called crystal field splitting.
Step 3:
Up to this point the complex formation would not be favoured. However, when the ligands approach further, there will be an attraction between the negatively charged electron and the positively charged metal ion, that results in a net decrease in energy. This decrease in energy is the driving force for the complex formation.

During crystal field splitting in octahedral field, in order to maintain the average energy of the orbitals (barycentre) constant, the energy of the orbitals dx2y2 and dz2 (represented as t2g orbitals) will increase by 3/5∆0 while that of the other three orbitals dxy . dyz and dzx (represented as t orbitals) decrease by 2/5∆0 . Here, ∆0 represents the crystal field splitting energy in the octahedral field.