When there are degenerate energy states, i.e. distinct states of the quantum system that have the same energy. When your Hamiltonian has degenerate states, degenerate state perturbation theory is utilized to derive the first order and second order, etc... equations for the perturbation Hamilonian.
There are several classic examples where this is utilized. For example, shifting and splitting of spectral lines of atoms and molecules due to the presence of external magnetic (Zeeman effect) or electric (Stark effect) field.
If you're interested in reading a textbook about the basics of this, the intro book by David MacIntyre has an exquisitely written approach to learning about perturbation theory in (non-relativistic) quantum mechanics.