Earwax is produced by glands in the ear canal to trap dust and protect the eardrum. Learn how to prevent and treat earwax blockage, which can cause hearing loss, dizziness, ear pain, and infection. Ear wax , medically known as cerumen, is a natural substance produced by glands in the ear canal to protect against dust, bacteria, and foreign particles. While ear wax usually clears out on its own, excessive buildup can cause discomfort, hearing difficulties, or even infections. Ear pain or itching deep inside the canal People who wear hearing aids, earbuds, or earplugs are especially at risk, since these can trap wax and block the canal from self-cleaning. If you use hearing devices, check out our guide on cleaning and maintenance tips, including when to change wax guards. Earwax also contains dead skin cells and hair. [3] Excess or compacted cerumen is the buildup of ear wax causing a blockage in the ear canal [2] and it can press against the eardrum or block the outside ear canal or hearing aids, potentially causing hearing loss.