Ships float due to the principle of buoyancy, which is based on Archimedes' principle. The weight of the water a ship displaces is equal to the weight of the ship itself. The shape of the ship, particularly its hull design, allows it to displace enough water to generate an upward buoyant force that counteracts its weight. Even though steel is dense, the overall design and displacement volume of a ship are carefully engineered to achieve buoyancy, allowing it to float on the water's surface.