The best way, if you can hold your dog down, is to use an ear flush! You can get them at most pet stores or your Vet. Have the dog lay on it's side and squirt some in and let it soak a minute or so while rubbing his ear. Do both sides and then I use a hand wipe to clean out any junk. Just make sure you squeeze out the liquid from the hand wipe first! Unfortunately, we can't keep our Hound Dog to lay still, so we have to take him to the Vet to do it!
I have a black lab, and clean his ears w/ equal amounts of vinegar & warm water. I use a syringe & put about 7 oz in each ear, rub to leave it in about 10 seconds, then let him loose! He shakes, rubs on the ground, then when he's done shaking he gets a treat. This can be done weekly.
I use those little gauze pads and make them wet with an ear cleaning solution then using tip of finger just push the pad into his ear and use a wiping motion, repeat until there's no more gunk on the pad.