Cerumen is the official word for ear wax.
Ear wax is produced by wax glands at the base of tiny hairs deep in your ear canal.
The ear wax helps trap small particles that might get into your ears. The tiny hairs point outward and tend to cause the wax (and particles) to slowly drift toward the outer ear.
Although, normally the ear is self cleaning, it's possible for ear wax to from a clot that can affect your hearing until it is removed.
Professionals recommend not sticking things into your ears (including Q-tips), since that can damage your ears and can even cause more wax to form.