The Aufbau Principle states that, in the ground state of an atom or ion, electrons fill atomic orbitals of the lowest available energy level before occupying higher-energy levels.
In a hydrogenic atom/ion, the only factor determining energy is the value of n, so the ground state will always be the 1s orbital.
In atoms/ions with two or more electrons, the ground state electron configuration minimizes the total energy of the electrons, obeys the Pauli exclusion principle, obeys Hunds rule of maximum multiplicity, and considers the exchange interaction.
Electrons will occupy the lowest energy orbitals to minimize the total energy.
Hund's rule of maximum multiplicity states that for a given electron configuration, the lowest energy arrangement of electrons in degenerate orbitals is the one with the greatest "multiplicity," where multiplicity is the number of unpaired electrons (n) plus 1.
The Pauli exclusion principle states that it is impossible for two electrons of a multi-electron atom to have the same set of values for all four quantum numbers.
Two electrons in the same orbital must have opposite half-integer spin projections.
The exchange interaction results in a ground state electron configuration with unpaired electrons all being of the same spin.
Orbital energy levels directly correspond to their shell number.
Orbitals within a shell generally follow the energetic trend where s<p<d<f.