Ears are one of the sensory organs which are open to the environment for about one inch deep. The sound waves reach the eardrum and it vibrates accordingly. These vibrations are transmitted as signals by the bones and cochlea in the ear.
If any organisms or dust present in the air reach ear drum, it causes damage. Hence nature has provided us with sebaceous glands in the ear which secretes oily secretions. When any foreign particles like dust enter our ear through air, they get stuck by this oil and over a span of time forms a semi-solid material called wax.
Wax has to be removed only through medical supervision and any self attempts to remove it using pins or buds is harmful to ear.
More people should be reading this!