How the Handgun Fires
Here are the steps showing what happens when you fire a handgun.

Top: A cartridge is inserted into the chamber.
Middle: The action is closed, and the firing pin is pushed back and held back under spring tension.
Bottom: The trigger is squeezed, releasing the firing pin, which moves forward with great force. The firing pin strikes the primer, causing it to explode.