Ok, I just realized that you may be thinking of the Slide on most Semi-Automatics and not exactly the Hammer.
Well, when you pull the slide, what you're doing is loading a bullet into the chamber and cocking the hammer back at the same time.
If you don't pull the slide back, then the gun isn't loaded and will not fire.
However, once you pull the slide the gun is loaded, and when fired, the pressure of the explosion will push the slide back and auto reload the chamber.
That's why you see the slide pull back everytime you fire the weapon.
You can pull the Slide and have a gun loaded anytime you want, but you better not forget to unload that bullet, or you could pay a big price for it
Revolvers don't work this way, because there's no bullet to load into the chamber. All you have to do is line up the hole with the barrer and the hammer will do the rest. The only way to keep a revolver unloaded is to take out the bullets out of it.