First and foremost, I cannot stress well enough how important it is to keep your ears clean. A musician friend of mine neglected his ears for a long time, and the waxy buildup rendered one ear completely useless. And until he had both properly cleaned by a doctor, he had no idea how nearly useless his other ear happened to be.
For motivational purposes, let me briefly describe how the doctor properly cleaned his ears. The doctor had an illuminating otoscope, and through the narrow hole of the funnel-shaped portion protruded a narrow metal rod. On the end of the metal rod was a sharp scraping tool. The doctor inserted the scope into an ear and, while peering through it, he scraped away chunks of dense, hardened wax. He periodically pulled the scope back to bring the chunks out and wipe them off his scraping tool. As 2 cubic centimeters of dark waxy matter were removed only millimeters from each of my friend's ear drums, the padded armrest my friend was clinging to was getting the squeezing of a lifetime. Apparently the entire procedure is painful. Not to mention the anguish one suffers when dwelling on the serious consequences upon precious eardrums that could occur if the doctor makes any mistakes.
Although advised not to for several days, until the swelling and irritation on his inner ear had reduced, my friend was given procedures to follow from now on for proper ear cleaning. One should take hydrogen peroxide and dillute it with water, then tilt it into an ear while the head is tilted with an ear syringe. The solution should be kept inside the ear for several minutes, and then flushed out with pure water, again applied with an ear syringe. There will be a funky sizzling sound as the solution sits in place. That's fine. It means it's working. The hydrogen peroxide is dissolving the wax built up inside the ear. You can buy commercial solutions for this, but they tend to be mostly mixtures of oil and hydrogen peroxide. That oil makes them a bit messy, and since hydrogen peroxide costs less than ramen noodles, it makes no sense to pay exorbitant prices for the messy oil products.
Then fluff up a Q-tip and insert it in the ear, mostly to sop up the fluids and dry things out. And twirl it around a little to get any solid matter that still needs to come out.
I also learned that in certain cultures (they have these in Ho Chi Minh City in Vietnam, for example), it's common to find ear cleaning parlors where one pays good money to have a person alternate between blowing puffs of steam into one's ear and scraping wax out with sharp metal tools. I wouldn't go for that, myself, though. Not after what i heard about the treatment from my friend's doctor.