The pressure is calculated in newtons/meter if the force is measured by units of newtons. This is also known as 1 pascal.
Some people prefer other units. 1 N/m2 equals 0.000145 pounds per sq inch (psi.).
Let's try to estimate the difference between pushing with a finger and with a hand. My hand measures approximately 8 by 15 cms in size. This gives the area as 0.012 square metres. Let's say I can push with 100 newtons of force. That would be 22 pounds. This would mean that my push on the wall's pressure would equal 8,333 pascals.
The pointy end of a nail's tip is very small. It has a diameter of less than 1 millimeter, so let's round it up to 1 mm. It has a contact area equaling the area of a circle of 1mm diameter, or 7.85x10-7 m2. It's small. This area can be pushed with the same 100-newton force. It produces a pressure of 1.27x108 pascals. This is a lot more than what you get from pushing with your hands. That's why the nail penetrates the wall.
What about the bed of nails? You can imagine what would happen if you just sat down on one nail. A single nail is very small and exerts a lot of pressure. This would cause it to break through your skin. You will still be fine if you have many nails. The pressure is reduced by having many nails.
How many nails do you need to lay on to be safe?
It turns out that human skin can only be punctured by a pressure of around 100 psi (689,000 pax). Imagine a person weighing 750 tons. This is the force that will push down on the nail bed. This force must be distributed over a large area to ensure that there is no pressure on any nail that exceeds 100 psi.
This minimum surface area is 1.1x10-3 m3. I also estimate the area needed for one nail. So, I can calculate how many nails are required to make the bed. (I will use pressure units in pascals.