The hammer applies a force to the nail head. that force is transmitted to the pointed end of the nail, in contact with the piece of wood. because the nail point is extremely small, the pressure applied to the piece of wood right under the nail point is huge- big enough to pry the wood fibers apart and allow the nail point to start penetrating the wood.
Now note that the piece of wood is lying on a stout workbench which, being heavy, reflects the impulse force delivered by the hammer blow right back into the piece of wood, causing the wood between the nail tip and the workbench surface to get crushed. in goes the nail.
To guarantee that the hammer blow will bounce off the workbench and back into the wood requires that the inertia of the bench be a certain amount bigger than that of the hammer. for a very large piece of wood, the inertia of the wood will suffice.
If you are clever enough, you can actually calculate the mass ratio (workbench/hammer) needed to get the hammer blow to bounce off the bench and crush that which is between the bench and the hammer.
BTW this determines how heavy an anvil must be for use with a 5 pound hammer, while working hot iron. The solution of this problem is left as an exercise for the interested reader, and will count for half your grade for the term.