How does a pistol work? --- Vishnu, Chennai, India
The very simplest "pistol" would be a hand-held tube. One end of the tube is capped. There is a small hole in the cap for a fuse. You put gunpowder and a lead ball in the tube and light the fuse to fire it. This is essentially a small hand cannon.
The modern incarnation of the hand cannon uses a firecracker for the propellant. You can see a gun like this at the bottom of Build your own gun
Most people prefer a pistol to shoot more than one shot before needing to reload, so the revolver was invented in the 1800s. It typically holds six bullets in a revolving cylinder. Each time you pull the trigger, the cylinder rotates one notch to position the next bullet. See How Revolvers Work for details.
The semi-automatic pistol is the next step in pistol evolution. A spring-loaded bolt slides with each shot , ejecting the spent casing and loading a new bullet from the magazine in the handle. In larger handguns, the magazine may be able to hold 15 bullets, and the trigger action is lighter than with a revolver. This animation shows a typical action:
The one disadvantage of the semi-auromatic pistol is the possibility of jamming, which is nearly impossible with a revolver. Here's how to clear a jam:
And finally there is the automatic pistol. The action does not stop after each shot. Instead, the next bullet is fired as soon as it loads into the chamber. Like this:
A larger magazine helps: