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.
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.