The absorption occurs when energy, i.e., photons, is absorbed from the radiating field. The intensity of the absorption varies as a function of frequency, and this variation is the absorption spectrum.
In chemistry, the technique is used to detect and measure concentrations of a particular metal element within a solution. The scientists atomise the sample (make it turn to individual atoms) and then see what light wavelengths it absorbs. Each type of chemical (element) absorbs a particular wavelength, so scientists can tell which chemicals are in the sample. Every element has a different atomic absorption spectrum because of the different light wavelengths it absorbs.