How do d orbitals fill?
There are five d orbitals starting with the fourth energy level. One electron enters each orbital, having the same spin. Then a second electron enters each orbital, having opposite spin, for a total of 10 electrons. This is similar to the way in which p orbitals fill.
Starting with the fourth period, electrons start filling the d orbitals. There are five d orbitals, and like the p orbitals, they fill one electron at a time, each with the same spin. Once the five d orbitals are filled with one electron each, a second electron fills each of the d orbitals with a spin opposite to the first electrons, just as in p orbitals. A filled d sublevel will have five orbitals filled with electrons of opposite spin for a total of 10 electrons in the d sublevel
The following diagram shows the orbital filling diagrams for the transition elements in the fourth period. The 3d sublevel has lower energy than the 4p sublevel, so the 3d sublevel fills after the 4s sublevel but before the 4p sublevel.
The electron configurations of chromium (Cr) and copper (Cu) are different than expected because half-filled energy levels are more stable than the expected configuration.