There are noise-canceling and noise-blocking implements.
Good-quality earplugs (NRR of 33 or higher) will attenuate noise within a frequency range, blocking out the white noise (engine noise, wind noise, etc.) that is common in air flights. They will attenuate baby crying and other loud noises.
A variety of over-the-ear, on-the-ear, and in-ear head- or earphones also offer varying degrees of noise isolation (attenuation) while allowing music or other sounds. These are all passive; they work by absorbing or blocking some of the sound from reaching your ears.
Over-the-ear, on-the-ear, and in-ear head- or earphones also offer varying degrees of noise cancellation while allowing music or other sounds. Noise cancellation is active; it requires a microphone to hear what your ears would hear, a processor to generate the inverse of the noise, and a speaker to play the inverse. When done properly, the noise is cancelled out by its inverse, resulting in a flat line of silence. Reality is usually more complex, but noise cancellation can be very effective, especially with steady noises within narrow frequency ranges. Noise-canceling devices may also be sound-isolating.
If you're looking for a product to meet your needs and budget, be specific about your needs if you know them. How long at a stretch will you use them? Will you sleep with them on? Do you need to remove and replace them frequently? What range of frequencies are most import to you to be blocked? How critical is the quality of the sound reproduction?