White dwarfs are the dense, burnt-out remnants of the vast majority of stars, condemned to cool over billions of years as they steadily radiate away their residual thermal energy. To first order, their atmosphere is expected to be made purely of hydrogen due to the efficient gravitational settling of heavier elements. However, observations reveal a much more complex situation, as the surface of a white dwarf (1) can be dominated by helium rather than hydrogen, (2) can be polluted by trace chemical species, and (3) can undergo significant composition changes with time. This indicates that various mechanisms of element transport effectively compete against gravitational settling in the stellar envelope. This phenomenon is known as the spectral evolution of white dwarfs and has important implications for Galactic, stellar, and planetary astrophysics. This invited review provides a comprehensive picture of our current understanding of white dwarf spectral evolution. We first describe the latest observational constraints on the variations in atmospheric composition along the cooling sequence, covering both the dominant and trace constituents. We then summarise the predictions of state-of-the-art models of element transport in white dwarfs and assess their ability to explain the observed spectral evolution. Finally, we highlight remaining open questions and suggest avenues for future work.