There are three kinds of holes: small, medium and large, and each require a different procedure to repair.
Small holes are easy to
For holes smaller than one inch, simply spackle the hole filling it completely.
Allow to dry thoroughly, it will crack, that's to be expected.
Apply a second coat, this time feathering it out a little.
Repeat once or twice more, feathering a little more each time as needed.
Sand as needed and paint.
For holes one to two-and-a-half inches, apply a thin coat of spackle, covering the surrounding area by about three inches.
Firmly press a piece of drywall joint tape over the hole and smooth it with a taping knife.
Allow to dry thoroughly, then apply feathering