How do boats float? How do kayaks, rafts, and freighters stay afloat, too? They and other water-vessels operate under buoyancy, the ability of an object to float in liquid, such as water. Buoyancy is an upward force, caused by fluid pressure, exerted on an object that is immersed in it. If the object is less dense relative to the liquid or is appropriately shaped (like a boat), the force can keep the object afloat. The object is buoyed up by a force that is equal to the weight of the liquid that the object occupies an area previously occupied by the liquid. If the object is shaped in a way that it occupies the volume of liquid whose weight equals that of the object, the object will float.
Whether an object sinks, floats, or stays where it is depends on the buoyancy of the object, which depends on the pressure of the liquid at that depth and the downward pressure the object exerts on the liquid. This is related to the density of the object, things that have a lower density than the liquid will float. This is because the object weighs less than the liquid is displaces. If the object is denser it will be heavier than the same amount of liquid it will sink as it displaces more liquid.
However, no object truly floats on water; every object with mass sinks somewhat. It simply does not sink to a depth where the object is entirely below the water line.