How it works
Noise-cancelling headphones fight sound with more sound.
Sound is a wave of tiny pressure changes. Microphones on the headphones pick up the noise around you, and a chip creates the mirror-image wave: higher pressure wherever the noise has lower pressure, and the other way round.
When the two waves meet at your ear, they largely cancel out. Physicists call this destructive interference.