A pistol is a type of weapon.
A pistol was just one artifact found in San Francisco in 2368. According to Data it was a "forty-five caliber single action cavalry pistol invented by Colt Firearms in 1873". (TNG: "Time's Arrow")
The Nazis of Ekos were armed with, among other things, pistols reminiscent of the Luger model known from Earth of the 1930s and 1940s. (TOS: "Patterns of Force")
A revolver was another type of pistol. (TOS: "Shore Leave", "Spectre of the Gun")