"The skin cells lining our outer ear canals include tiny glands,
similar to sweat glands, which produce wax. The point seems to be
that this acts as a protective layer, which traps dust and other
particles which get into the ear. The wax slowly works its way to
the outside, taking the trapped dirt and dust with it.
Most people's ears clear the wax, which probably comes off on our
pillows and towels etc., at a rate which means that it does not
build up. Some people may, at some stages in their lives produce
wax at a faster rate. Other people have either one or both ear
canals that is narrow, or that is at an angle which slows the
natural passage of the wax. In these people the wax builds
up.
The wax may eventually block off the ear canal all together. If
this happens, hearing is reduced, and there is an increased
likelihood that stagnation may lead to an infection building up
behind the obstruction."