electron configuration
Imagine an atom as a small apartment block whose rooms are the one-electron orbitals, each with a fixed energy and capacity. The electron configuration is simply the guest list: which rooms are occupied and by how many electrons. It answers the question 'given Z electrons, where do they sit?' and it is the starting point for almost everything about an atom's chemistry and spectrum.
Formally, the configuration is written as a product of occupied subshells labelled by the principal quantum number n and the orbital letter (s, p, d, f for l = 0, 1, 2, 3) with the occupancy as a superscript, e.g. carbon is 1s^2 2s^2 2p^2. It arises from the central-field (independent-electron) approximation: each electron is imagined to move in a single averaged, spherically-symmetric potential produced by the nucleus and the smeared-out charge of all the others, so the many-electron problem factorizes into hydrogen-like orbitals. Electrons then fill orbitals from lowest energy upward (the Aufbau principle) subject to the Pauli exclusion principle, which allows only one electron per (n, l, m_l, m_s) state, so a subshell (n, l) holds at most 2(2l+1) electrons. The approximate filling order follows the Madelung (n + l) rule: lower n + l first, and for equal n + l the lower n first.
The configuration matters because it fixes the number of valence electrons, the ground-state term, and the periodic table's block structure. But be honest about what it is: an approximation. The true state is a correlated, antisymmetric many-body wavefunction; the configuration names only the dominant Slater determinant of the central-field model. Real atoms show exceptions where a nearly-filled subshell wins on exchange energy (chromium is [Ar]3d^5 4s^1, copper is [Ar]3d^10 4s^1, not the naive 3d^4 4s^2 or 3d^9 4s^2), and the 4s-before-3d ordering is a delicate near-degeneracy, not a law.
Iron (Z = 26) is 1s^2 2s^2 2p^6 3s^2 3p^6 3d^6 4s^2, or [Ar]3d^6 4s^2. The [Ar] core (18 electrons) is closed and chemically inert; only the 3d and 4s electrons take part in bonding, magnetism, and the visible-light transitions that colour iron compounds.
Only the outer, unfilled subshells do the interesting physics; closed shells are spectroscopically silent.
The (n + l) filling order predicts ground-state configurations, not energy ordering of the occupied orbitals in the final atom — once 3d fills it typically drops below 4s, which is why transition-metal ions lose 4s electrons first.