You do that with a 'patch plug,' though. If there's a tar plug (or whatever the technical name would be) stuffed in it, you pull that out before installing the patch plug (which is just a patch with a little rubber cylinder coming out of the middle).
FWIW, though, plugs can work okay. They often leak because people don't do a great job putting them in...which is expected; it's kind of a ghetto quick-fix.
But if you remove the nail/screw/whatever without leaving any remnants, size the hole right (I use a drill rather than trying to wallow the hole out with a T-handled reamer...people look at you funny when you stab a drill in a tire), apply a little cement to the plug before stuffing it in, and push it in to the proper depth...I've had them last the life of a tire without leaking.
It's a lot of little things to get right for such a simple fix. And it's still not the 'right' repair...but it can work. I definitely wouldn't ever recommend plugging when patching is an available option.
I've seen a lot of botched patches, too, though. Usually someone grinds on the inside of the tire too much and exposes cord. Or they don't apply the proper compound to the tire before applying the patch...it's not cement, but rather something that is supposed to soften the rubber and allow the patch to stick properly.