Revolvers work by having six chambers loaded with cartridges that can be rotated in front of the gun's barrel. This allows the gun to fire six shots before the shooter has to reload.
The trigger lever forces the hammer back and causes a spring attached to the hammer to compress in the gun's stock. The same motion also causes a pawl, which is also attached to the trigger, to push on a ratchet on the cylinder, forcing it to rotate. Another pawl ensures the cylinder is lined up properly with the barrel. Once the trigger lever is pulled all the way back, the hammer is released. The firing pin on the hammer causes the primer to explode, igniting the propellant and sending the bullet through the barrel and out of the gun.
When all the cartridges in the revolver are used, the shooter can swing the cylinder out and push the ejector rod to remove the spent shells from the cylinders.
A double-action revolver gives the shooter the option of pulling the trigger to cock and fire or cocking the hammer before pulling the trigger. When the hammer is cocked prior to pulling the trigger, it allows the trigger to move more easily when the shooter wants to fire.