Explain the rule according to which electrons are filled in various energy levels.
The Aufbau principle states that, hypothetically, electrons orbiting one or more atoms fill the lowest available energy levels before filling higher levels (e.g., 1s before 2s). In this way, the electrons of an atom, molecule, or ion harmonize into the most stable electron configuration possible.
Aufbau is a German noun that means construction or "building-up". The Aufbau principle is sometimes called the building-up principle or the Aufbau rule.
The details of this "building-up" tendency are described mathematically by atomic orbital functions. Electron behaviour is elaborated by other principles of atomic physics, such as Hund's rule and the Pauli exclusion principle. Hund's rule asserts that even if multiple orbitals of the same energy are available, electrons fill unoccupied orbitals first, before reusing orbitals occupied by other electrons. But, according to the Pauli exclusion principle, in order for electrons to occupy the same orbital, they must have different spins (−1/2 and 1/2).
A version of the Aufbau principle known as the nuclear shell model is used to predict the configuration of protons and neutrons in an atomic nucleus.