|MadSci Network: Physics|
Yes you can do it, and the technology is very simple. The problem is, when you say 'cancel out' you are proposing question that is in too simple terms to really describe what you want to do. You didn't mention where you want to cancel the sound. The noise cancelling headphones you mention do exactly that, cancel out incoming noise by creating an equal but 180° out of phase. The thing that makes them practical is that they cancel out the noise/sound in one specific place - your ear.
That would be the problem you incur when trying to cancel out sound out in the open, you can do it but only in one spacial spot. All the other places would still be getting some remaining sound from the speakers. So one privileged person would be able to experience peace and quiet, presuming he didn't move from that one spot, but everyone else would hear the extraneous noise.
Try the links in the MadSci Library for more information on Physics.