Active noise-cancelling headphones use a microphone, amplifier, and speaker to pick up, amplify, and play ambient noise in phase-reversed form; this to some extent cancels out unwanted noise from the environment without affecting the desired sound source, which is not picked up and reversed by the microphone. They require a power source, usually a battery, to drive their circuitry. Active noise cancelling headphones can attenuate ambient noise by 20 dB or more, but the active circuitry is mainly effective on constant sounds and at lower frequencies, rather than sharp sounds and voices. Some noise cancelling headphones are designed mainly to reduce low-frequency engine and travel noise in aircraft, trains, and automobiles, and are less effective in environments with other types of noise.
If you’ve been on an airplane in the last few years, you’ve probably seen the Bose QuietComfort noise-cancelling headphones before: they’re a favorite of regular travelers because they’re so good at keeping outside noise out. They’re comfortable, they sound incredible, and the noise cancellation is so impressive that you feel like you’re in your own personal bubble. These headphones are not cheap, but they’re definitely worth the money.
Earbuds have small speakers that rest on the ear canal of the wearer. These are usually much less expensive than on-ear and over-ear headphones and reproduce the sound well. However, outside sounds, such as traffic or power tools, can get past the earbuds and interfere with your enjoyment. Earbuds also don't stay in place very well if the wearer is moving much, such as exercising. These also are lower fidelity than on-ear and over-ear headphones.