Mark a spot to place flat head screws a couple of inches above and below the nail pop. Use drywall screws.
Drill the screws into the wall with a power drill. Countersink the screws slightly below the surface of the wall.
Pull the loose nail out with the claw end of a hammer. Slide the claw of the hammer between the nail head and the wall. Rock the hammer handle downward in the direction away from the claw. The claw will rotate upward, pulling out the nail.
Fill the indention over the screw heads with a bit of Spackle using a putty knife. Taper the Spackle out in all directions from the screw head. Let the Spackle dry for a couple of hours.
Sand the surface of the wall smooth to remove rough spots and ridges, and then touch it up with paint to match the wall.