I mean you could just mud over it and paint, but that’s a bandaid, not a fix.
To properly fix, you want to screw above and below the pop, make sure you don’t bury the screws. Use one of those drywall bits that have the collar on them. Then mud over all of them and paint.
This is what the guy from the YouTube channel Home Renovision DIY suggests. He seems to know what he’s talking about and explains it clear enough that it gives me enough confidence to try some repairs myself.
Yeah, that guy is really awesome with a lot of things. I actually followed his video (roughly) on building a shed.
Vancouver Carpenter is also really really good (despite the name he mostly does drywall and plaster these days)
He had a video for nail pop: https://www.youtube.com/watch?v=i6zMpANFvnA
And one for screw pop: https://www.youtube.com/watch?v=fLmrm5Y7u5k
Since you haven’t gotten an answer yet. I thought I’d chime in. I’m not great with home improvement, but a coworker told me this:
Find the stud that the nail is in.
Use a drywall screw and screw it in near the nail into the stud.
This should pull the drywall closer to the studs and make the nail stick out a little more.
Pull the nail out and fill the hole with putty.
Sand, finish, and paint after the putty has dried.