Ships and humans can stay afloat by spreading their weight across the water
When looking at a freighter or cruise ship, it’s hard to understand how such a hulkingly large object can sit on the surface of the water. After all if you jump into a swimming pool, you’ll sink, right? So why can something so much heavier float along while carrying cars, oil or thousands of people? If it seems like there’s a contradiction here, it might help to remember that human bodies *don’t* sink only if they’re in a vertical position. If you can lay out flat, it turns out the water can hold you up as well as any 129,690 ton cruise ship.
Displacement and density
This isn’t to say that weight isn’t important at all. The weight of an object determines how much water will be displaced by the boat or body, all at a handy 1:1 ratio. So if a 200 pound person hops into the water, they’ll push 200 pounds of water out of the way when they do so. However, there is more than one way to push that water around, which is where density and shape come into play.
As a person, a log or a steel ship displace water down and to the sides, the water underneath you also exerts pressure upwards, pushing the object up towards the surface. That upward pressure is able to overpower the weight of the object more easily if the object’s mass is spread out more, so that overall it’s less dense than the water itself. With a human, floating on your back spreads out your body weight, with the air-filled cavity of your chest being decidedly less dense than all the water pushing up from below. For a metal ship, the metal by itself is denser than the water, but the ship overall isn’t, thanks to the air and empty space contained in the ship’s hull. So being big can be an asset, since it allows weight to be spread out further over the water, effectly lowering the ship’s density overall, which is what the water below cares about.
Surfacing with salt
How well an object floats or sinks isn’t entirely up to the object though. The temperature and composition of the fluid it’s floating in makes a difference too— for instance, the salt in ocean water makes it denser than freshwater, and thus better at supporting objects bobbing along. The Dead Sea takes this to an extreme, with such high salinity human bodies have a hard time not floating.
Source: Buoyant Science: How Metal "Boats" Float by Science Buddies, Scientific American