Earwax, also known as cerumen, is a yellowish waxy substance secreted in the ear canal of humans and other mammals. It protects the skin of the human ear canal, assists in cleaning and lubrication, and also provides some protection from bacteria, fungi, insects and water.

Earwax consists of shed skin cells, hair, and the secretions of the ceruminous and sebaceous glands of the outside ear canal. Major components of earwax are long chain fatty acids, both saturated and unsaturated, alcohols, squalene, and cholesterol. Excess or compacted cerumen can press against the eardrum or block the outside ear canal or hearing aids, potentially causing hearing loss.

More Info: en.wikipedia.org