An overview is given of the interactions that determine the XANES spectral shapes of transition metal compounds. The interactions are divided into ground state effects, final state effects and transition effects. The metal L edges, metal K edges and ligand K edges are analysed with respect to these interactions. The importance of XANES is partly due to its wide versatility in measurement conditions. XANES spectra can be measured using a number of sample environments, ranging from vacuum to ambient pressures for soft x-rays and up to extreme conditions with hard X-rays. These in-situ XANES spectra can be measured with a spatial resolution of 10 to 30 nm. XANES spectral shapes can be used as resonant channels in resonant photoemission, resonant x-ray emission or resonant diffraction experiments. This gives rise to a large number of resonant techniques that also allow the detection of site, valence, spin and symmetry selective XANES spectra and/or XANES spectra revealing information with a resolution better than its lifetime broadening.