Electrons are always removed from the valence electron shells and from the valence orbitals within the shell when forming a cation. For example, Cr has a electronic configuration of 1s2 2s2 2p6 3s2 3p6 3d5 4s1
When forming the ion Cr3+, the new electronic configuration will be 1s2 2s2 2p6 3s2 3p6 3d3. We can see that 3 electrons are removed from the valence shell following the order of the highest energy orbitals to lower energy.