A firearm is a portable gun (a barreled ranged weapon), and there are three basic types of handguns.
A ranged weapon is any weapon that can engage targets beyond hand-to-hand distance, i.e., at distances greater than the physical reach of the weapon itself.
The smallest of the firearms is the handgun, and there are three basic types
The single-action revolver is fired by cocking the hammer and squeezing the trigger one shot at a time
The double-action revolver can be fired in the same manner as the single action or by squeezing the trigger to fire (a double-action.)
And the semi-automatic uses a single fixed firing chamber machined into the rear of the barrel, and a magazine that can be used to fire more than one round. Each press of the trigger fires a cartridge, using the energy of the cartridge to activate the next cartridge, which may be fired immediately.
The video below shows how each one works.