Answer
Noise-canceling devices rely on the principle of destructive interference.
Work Step by Step
The electronics detect the noise, invert it, and then create an opposing wave ($180^{\circ}$ out of phase with the original).
The created waveform is designed to superpose with the original waveform to give a net sound wave that is close to zero.