I am using my front door as an example for this project. I replaced all of the hardware and the locks when we moved in. They were originally brass, but not liking the look, I went with a brushed nickel set. The holes didn't match up perfectly with the existing ones, so I knew that when I was ready to paint the door, I would have to fill the unused hole.
Step 1: Get some Wood Filler. I used Elmer's ProBond Wood Filler, and made sure that it could be painted or stained over. Cut off the tip of the applicator, and push some of the putty into the hole.
Step 2: Using a putty knife, smooth it over, but not completely flush to the surface of the door. Since the hole in my door went all the way through to the other side, it was hard to make sure I was keeping as much filler in the hole as possible. Don't risk using too little, so feel free to over-apply. Let this sit until it is completely dry. If your hole doesn't go all the way through to the other side of the piece of wood, you don't have to pack as much on, and you can scrape it off a little so it is more even with the rest of the wood. Leave the filler to sit until it is dry, referring to the instructions on the filler container if you are unsure of how long to wait.
Step 3: Once the filler is completely dry, put a mask on so you don't breathe in the dust and sand over the filled hole. You should also really use gloves to protect your hands, and so you don't get splinters. Make sure that when you are sanding down the wood filler, you follow the grain of the wood. Sanding in the opposite direction from the wood grain will leave scratches in the wood, which will be visible, especially after painting or staining.
Step 4: When sanding is complete, use a vacuum to get all of the sanding residue off of the wood. Be more precise than you think, because you don't want any dust to get into your paint or stain.
Full directions with more details available here: http://rhodylife.blogspot.com/2013/04/diy-repair-hole-in-wood.html