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.
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.