Air canal present in our ear contains the specialized cells which produces ceramin. This caramin is called as "Earwax". Earwax is a natural substance which is acidic and oily in nature.
Due to presence of earwax, various bacteria and virus like fungus can not enter the ears. So, our ears are prevented from the infection. Other than this, the oily nature of earwax, saves us from dust.
Although we didn't need the earwax to remove from the ears because it acts as a device to make our ears healthy and secondly the skin of our ears naturally keeps the excess air away which is cleaned by bathing.
However, earwax is present in large amounts in some people so they are unable to listen properly. And they use cotton swabs to clean the ears. Cotton swabs makes the wax more deep and ultimately it goes near to eardrum. So, wax doesn't find a way to get out. It becomes dry after some days and the make the hearing power reduced. Cotton swabs can even puncture the eardrum because of which hearing loss can occur.
You can wash the ears with hot water to remove the earwax for clean ears.