you want to cancel noise where? to cancel noise at the detector (where you have the microphone) you simply need to invert the signal (swap + and - cables), match the amplitude, and shape the frequency to correct for your equipment. to cancel noise at some other point on a line that joins source and microphone you need to also add a delay (if cancelling further away) or somehow "advance" the sound (if cancelling between source and microphone). if cancelling off-axis then things get more complicated (and you need both signals).
in the complicated cases (off-axis or before the microphone) you need to do some kind of more advanced signal processing. one way to do that is to use ffts, but it might be more efficient to find approximations that use digital filters
i would guess that bose headphones and the like use signal inversion, amplification and some fairly simple frequency shaping, plus perhaps some kind of feedback detection (to avoid deafening people if it all goes wrong).
update: here is a really good paper on how the headphones work. they have various approaches including training a filter on white noise. and it's more complex than i guessed above.