Noise-cancelling headphones cancel out unwanted sound by creating an opposing sound wave.
Simply put, ANC is a technology that cancels out certain elements of sound. This ‘ ACTIVE’ technology does not just block the sound to nullify. Firstly, it listens to the sound using microphones(headset), and produces a sound wave of its own that effectively cancels out the existing sound.
This means that when one sound wave is at its highest peak, the other is at its lowest, effectively cancelling each other out.
Similarly the other way is Passive noise isolation were we uses padding to block the sound, just like wearing earplugs. But, this will only block some sounds, you can still listen loud sounds in passive. Padding will cover your ears, and you will not hear outside sound, but won’t work for all sound.