Ear wax protects the ear drum and the skin that lines the ear canal tissues from dirt and other foreign matter.
The healthy ear cleans itself; tiny hairs lining the ear canal slowly move the wax outwards.
When you clean your ear, you remove wax that moved far from its start. Never insert an object such as a cotton swab into the ear canal in an attempt to remove earwax. This can push the wax in deeper against your ear-drum.
Ear wax doesn't always have to be removed. But too much ear wax can lead to blockage of the ear canal and subsequent temporary hearing loss or pain.
If earwax causes discomfort, it is quite feasible to soften the wax by instilling drops of warm olive oil, sodium bicarbonate drops, or commercially available wax-softeners for four to five days prior to having the ears gently syringed or washed out.
Ears should never be cleaned with water unless the eardrum (tympanic membrane) is intact.
See your doctor if the earwax is causing pain.