I purchased a pair of noise canceling headphones today and I was just wondering how exactly they are able to cancel out background noise?
Briefly they take the waveform of the ambient noise then produce the inverse waveform which is then generated. The two waveforms effectively cancel out leaving a much quieter ambient sound level.
The important part is to be able to separate the wanted "noise" (music or voices) from the unwanted noise.
A search will give you several results that will provide much more detail.