Sound is a wave of high and low pressure, kind of like [this](https://www.flippingphysics.com/uploads/2/1/1/0/21103672/0327-animated-gif-6_2.gif). Noise cancelling headphones have a microphone that listens to the incoming sound and then makes an opposite sound: high pressure where the incoming sound has low pressure and low pressure where it has high pressure. The low pressure plus the high pressure equals no pressure (other than the undisturbed air pressure).
To play some music or a podcast on top of the noise cancellation it just adds that wave to the noise-cancelling one and plays the sum of the two.
Latest Answers