What is it?
Ear wax is a sticky liquid secreted by cerumen glands. It isn't really wax in the 'candle wax' sense (paraffin). Skin contains many tiny glands whose sole purpose is to secrete a variety of substances. Sebaceous glands, for example, secrete sebum, which gives skin its greasy quality. Sweat is also produced by microscopic glands. Cerumen glands are found only in the skin of the ear canals.
What purpose does it serves?
Ear wax, sticky stuff that it is, traps anything foreign that flies, crawls, or is blown into the ear canals. Dirt, tiny bits of plant material, small insects, bacteria, and so forth are immobilized by wax. Think of wax as the sticky stuff on a No Pest Strip. The primary purpose of ear wax is to protect your ear canal and ear drum from such foreign materials.

Some interesting facts
A build-up of ear wax has nothing to do with poor hygiene. You can't prevent a buildup of ear wax by washing or removing the wax yourself. In fact, you can make the problem worse by trying to remove wax yourself, for example by using cotton swabs. If you try to do this you can push the ear wax further into the ear canal and make it harder to get out. You can also damage your ear canal or eardrum.
YNWA @ 11:03 PM