Squeezing the trigger disengages the sear which holds back the firing pin under the tension of a spring. When released, the firing pin hits the rim of the cartridge case, detonating the primer which then ignites the propellant. The burning propellant generates a gas, the pressure of which, drives the bullet along and out of the barrel.