A pistol or handgun is a small firearm designed to be held in one hand, perhaps braced with a second hand but not held at the shoulder or hip. The barrel of a pistol is much shorter than that of most other guns, which allows ease of carrying and concealment, but at the cost of significantly reducing accuracy at long ranges.
Its essential elements are a barrel through which the projectile is propelled, a trigger and associated mechanism to initiate the firing of the projectile, and, in modern pistols, cartridges that contain the initiating explosive, propellant and bullet. Modern firearms also have provisions for bringing unused cartridges to the firing chamber after a previous one has been used.
Given the range of weapons available to a modern military, it is proverbial that "you never need a pistol until you need one very, very much." They would not be issued as a primary fighting weapon, but variously for personal defense by senior officers, medical personnel, and others who are unlikely to engage in personal combat.
They are also issued as a backup weapon to combat troops. In close quarters, such as fighting in buildings, a pistol may become the primary weapon due to easy handling. Special operations personnel use finely tuned pistols when clearing rooms.