The thing that keeps the person from getting holes in the skin is the distribution of forces over very many nails. Think of it this way. Take a single nail and let it rest point down on the skin of your arm. Let's suppose the nail weighs 1/20 of a pound. The weight of that nail will not be sufficient to make a hole in the skin. In fact I could push down on the nail with some force, perhaps up to a whole pound without injury.
How many nails then would I have to lie on if I am a 150 pound person so that each nail would be supporting 1 pound or less. That would be 150 nails. So as long as in getting on the bed, lying there and getting off, I always have at least 150 nails sharing equally my weight...no problem.
I do not know where this notion of lying on a bed of nails originated or who thought of it. It probably came out of the early days of show business when people first decided they would pay to see something out of the ordinary. There are many effects which at first glance appear contrary to common sense, but when you look at what is really happening are not mysterious at all.
This information is brought to you by M. Casco Associates, a company dedicated to helping humankind reach the stars through understanding how the universe works. My name is James D. Jones. If I can be of more help, please let me know.
JDJ