The mics in the headphones capture the surrounding noise and pass it on to the internal ANC circuitry. The ANC technology then generates a reversed acoustic wave (it reverses the phase) and transmits it to your ears. By the time the two sounds get to your ears, they cancel one another out.