This is one of the easiest repairs to perform on your walls. All you will need is some spackling compound and possibly a putty knife and some fine grit sand paper. One of the best spackles is manufactured by DAP and is available for purchase at any hardware store for less than $10. If the hole is small, less than 1/8" in diameter, you can simply place some of the spackling compound on the tip of your finger and press it into the hole. If any of the compound gets onto the surrounding area simply wipe it off with a damp cloth before it dries. Once the compound has dried you can touchup with the same color paint to match the wall.
If the nail hole is larger you will need to use a putty knife to press the compound into the hole. For these smaller holes you will only require a 1.5" putty knife. Simply scoop some of the spackling from the container with the tip of the putty knife then press into the hole.
Once the compound has dried, follow the manufacture's directions, and the area is smooth to the touch you should then sand the area with a 150-180 fine grit sandpaper. If there are still any low areas that require filling use the putty knife and follow the steps from above.
After you complete the final sanding you may then touchup the area with the same color paint to match the wall.
If you have a hole larger than 1" please read our article titled Repairing Damage to Walls.