OK, kind of a technical answer but basically, noise-cancelling headphones use a miniature microphone in the earpiece that picks up ambient noise (such as traffic, air-handling systems, etc.). Noise-canceling circuitry in the ear piece create a noise-cancelling wave that is 180° out of phase with the ambient noise. This circuitry is why you need the battery.
If you switch off the noise cancelling (or the battery goes dead), they still work like regular headphones.