Don't.
If your ears are working fine, don't clean them. If your ears are not working fine, then see a doctor. Don't poke anything up your ears.
Earwax, or cerumen as the medics call it, is not a waste product like pus or urine, which is best eliminated as soon as possible. Your ears are designed to function best with a coating of wax along the ear canal. The wax and the hairs are designed to exclude dirt, fungus, bacteria and insects from what is actually an orifice, an easy way into your body. The wax is designed to get full of gunk, and be replaced by new wax as it slowly moves outwards. It is not supposed to be entirely removed.
Evolution designed the ear, and did an OK job of it. The ear contains wax, therefore it is meant to contain wax. The earhole is narrow, therefore you're not supposed to poke anything in there any further that you can fit your little finger.
Sticking a foreign object like a metal scraper or an ear bud (a Q-Tip for Americans) into your ear has the following problems:
Firstly if you get to your delicate eardrum, you could damage it. Ouch.
Secondly as the basic principle of using a ramrod to tamp down a cannon shows, poking a blunt object down there is a very bad way of getting stuff out. You are likely to pack the wax up against the eardrum, and it doesn't belong there. It belongs further out - only the first third of the way to the eardrum is lined with wax. Packing wax against the eardrum can lead to muffled hearing, and infections, and you compounding your error by poking around in there again.
Thirdly the skin that generates the wax is delicate - it is easily broken or irritated by your scraping. And when it is, you're going to compound your error by scratching it where it itches.
Fourthly, you could actually remove the wax. If you do this, your body will step up wax production, because it knows that you need the wax, even if you don't want it. A vicious circle ensues.
Treatments
Some people do have excessive production of wax, or the wax is too hard, and will need this treated from time to time. If you go to your doctor, there are two wax-removing treatments that they may decide to use. However if the cause of your discomfort is not wax build-up but a torn eardrum or infection beyond the eardrum, a medic might refuse to syringe, as it could cause further damage. Often they refuse when the ear is blocked simply because they can't be sure what is going on out of sight behind the blockage.
Syringing is a procedure of carefully squirting warm water into the ear canal with a thick-needled syringe. The water flows back out the ear. It softens the wax and washes it out, without scraping at the walls of the ear hole or bursting the eardrum. My experience of syringing is that it sounds very loud as the water washes against the eardrum, but it only slightly uncomfortable (cold water in the ear is apparently very unpleasant). The procedure doesn't take long, but does require someone competent to perform it. Syringing should not be done if there is any suspicion that the eardrum may be damaged or inflamed.
Ear Drops are made from olive oil or a hydrogen peroxide solution in water. Ear drops are poured into the ear, and drained out a few minutes later. The drops will either dissolve part of the wax, or simply soften it to help to come out or aid a later syringing. This takes time, you have to lie on your side with your ear full of fluid, and then drain it out, and do this once or twice daily for several days. But you can do it on your own. Ear drops should also not be used if there is any suspicion that the eardrum may be damaged or inflamed.
Ear candling is pointless, it doesn't do anything.
Sources: Wikipedia, lectures from my GP. I'm not a doctor, but I've been a patient for this.
Thanks to andersa and nasreddin for corrections.