One problem many of us have are nail pops, that is when the top of the nail punches through the paint on the drywall. It is unsightly but easily fixed.
Drive an inch and a half drywall screw into the stud about two inches up or down from the nail pop. Make sure the screw embeds into the drywall and pulls it tight. Now drive the nail head into the drywall using a nail set and make sure the head is countersunk.
Using a lightweight drywall compound and a 6 inch broad knife, apply the coating over both the screw head and the nail head. Let it dry overnight and wet sand the area the next day and apply the finish coat of topping. The last step is very important; use two coats of primer over the patch for a consistent sheen to you final coat of paint.