First scrape the nail pop with the drywall knife to see what caused the pop. Most of the times we will find a screw instead of nail, what we need to do now is make sure that the screw or nail is tight and that the sheetrock has not become loose, otherwise we need to put a couple of screws to tighten up the sheetrock. If we do not do this step the nail pop could come back later on if the sheetrock is loose.
Now to cover the surface where the pop was created we use drywall joint compound, apply it smoothly with the drywall knife and let it dry, apply a second coat if necessary and sand it to make it even with the wall, wipe off the dust that was left behind when sanding with a damp towel and is ready to texture and paint.