CARS relies on the interaction of three laser beams: a pump beam, a Stokes beam, and a probe beam. When these beams interact with a sample, they create a new signal at the anti-Stokes frequency. This signal is generated only when the frequency difference between the pump and Stokes beams matches a specific vibrational frequency of the molecules in the sample. This makes CARS highly specific to particular chemical bonds, allowing for detailed chemical analysis at the nanoscale.