ATR operates by directing an IR beam into a crystal with a high refractive index. When the beam hits the interface between the crystal and the sample, it undergoes total internal reflection, creating an evanescent wave. This wave penetrates a few micrometers into the sample, allowing for the collection of spectral data. The depth of penetration depends on the wavelength of the IR light and the refractive indices of both the crystal and the sample.