This is easily done as essentially they are both doing something similar but in very different ways. Because of this you want to make sure you choose the right headphones for your situation – this article will clear things up for you.

Noise Cancelling
Noise cancelling headphones can reduce the amount of low frequency hum or ambient sounds reaching your ear drums. This can make it possible to listen to your music without having to raise the volume excessively or even help you get some good sleep on a long journey – they don't cancel out all noise. They are useful for people who travel a lot, especially by plane as the engine noise can become a nuisance. These headphones use active noise control to cancel out low frequency noise so they will need power; usually using batteries or USB power.

Depending on the model of headphone, if the power runs out one of three things will happen:

The noise cancelling function will stop running but you will still get sound from the headphones.

The sound will completely cut off, you will need to change batteries/recharge to use the headphones.

The noise cancelling will stop running and if the speakers have high impedance (require more power) then the sound you get will be faint.

A good example here is the Sennheiser PXC550, they are a Bluetooth wireless headphone that feature active noise cancelling, these do however stop playing when the battery runs out.

Sound Isolation
Sound isolation is a term used for headphones that block out external noise and reduce the amount of sound leaking for others to hear passively (without power), this is achieved by their build quality and materials used. Most closed back headphones or in-ear isolating earphones do this, but some will do it better than others. Lots of things can improve isolation such as leather ear pads, a good in-ear seal, heavy clamping force (tight fit on the head), acoustic treatment (dampening) in the ear cups and even the shape and material of the driver housing.

A prime example being the Bowers & Wilkins P7 Wireless, these have no noise cancelling but for everyday use they block out enough outside noise, and when the battery runs out you can plug the audio cable in and continue listening

Summary
Noise cancelling is great in theory, and for long journeys on planes it can be very effective, however it does have its drawbacks. In solving one problem, it creates another, and this is noise and lack of dynamic range in some senses. The other thing to note about noise cancelling is it is only effective against constant background noise, and does not help with sudden loud noises.

So it has its uses, but for most people, especially those wanting the best sound, noise isolating headphones are the only logical choice. The company will have put time into tuning the housing to reduce resonance, along with experimenting with different pad materials, to bring you the best sound and isolate unwanted noise.