Aufbau principle
New to topics? Read the documentation here!
Boring rule that says that less energetic atomic orbitals are filled first.
Much more interesting is actually determining that order, which the Madelung energy ordering rule is a reasonable approximation to.