In Real Life
, a "nail gun" is a carpentry tool, and a rather misnamed one at that. It may be shaped something like a (rather bulky) pistol, but functionally it's a pneumatic power hammer: it uses compressed air to slam a piston forward at high speed, which drives a nail into a board or other surface all at once. Also, nail guns have a safety mechanism which prevents the hammer from working unless the "barrel" of the gun is pressed firmly up against a hard surface.
You'd never know that from watching TV, though. If a nail gun appears on screen, it is invariably depicted as a big pistol capable of firing nails across a room.
This is something that a nail gun is specifically designed *not* to do; having one actually shoot a nail out when it's not pressed against a hard surface would require a serious Failsafe Failure