Both of the above postings are correct, just not complete. Taken together, they describe the safety mechanisms in an S&W revolver.
These two work in the following manner.
1. The rebounding hammer. When the trigger is released, spring pressure forces the hammer back to its at rest position. At the same time, the rebound side (which is directly linked to the trigger) moves forward into its resting position.
On the rebound slide is a "hump." This hump comes to rest under the front lip of the hammer, preventing it from moving forward.
2. The hammer block is a secondary mechanism. It is an L-shaped piece of metal that is attached to a stud on the rebound slide, and moves back and forth in a groove in the side plate. When the trigger is pulled fully back, this is retracted. When the trigger is released, and the hammer moves to its at-rest position, the L moves up and comes between the face of the hammer and the frame.
Even if the hammer is struck with a crushing blow that would somehow cause the hammer to go forward, this L device (I'll be darned if I can remember the proper name right now!) is there to prevent the hammer from moving far enough forward for the firing pin to hit a primer.