First, you will need dry wall compound and a putty knife.
Unless you indent the hole you are filling, it will create a small bump in the wall. So, take the time to use the bottom handle of the putty knife to indent the nail hole just a little bit. This makes it much easier to fill with the compound.
Take a small amount of compound on the edge of the putty knife and smear it over the hold at a 45 degree angle. Go back over it with the putty knife to be sure the compound is evenly covering the hole.
Wait for it to dry completely. Give it a light sanding and repeat another application of the dry wall compound. After completely dry, the final step is to either sand again OR use a drywall sponge to which you have gotten wet and wrung all the water from to use to gently wipe the area to smooth it out.
When the wall patches are completely dry and smooth, paint over the repairs with a primer. Otherwise the fresh paint will absorb differently into the repairs and be noticeable when the painting is finished. So, prep work is very important, I have learned.
I am no pro, but as a homeowner, I have learned a few thing that I can easily do myself, successfully.