ATR works by measuring the changes that occur in an internally reflected infrared beam when it comes into contact with a sample. A high-refractive-index crystal, typically made of diamond, germanium, or zinc selenide, is used to create an evanescent wave. This wave penetrates a few micrometers into the sample, allowing for the acquisition of its infrared spectrum. This makes ATR an effective tool for analyzing both surface and bulk properties of samples.