Provided a steel ship is intact, it remains afloat in water because of the upward pressure from the water below, which pushes the boat upwards and prevents it from sinking. The water pressure that keeps steel ships afloat is referred to as buoyancy force.
When ships float on the surface and glide through waves, they displace quite a bit of water. That water must return to its original state and, in doing so, pushes against the passing ship with an upward force.
At first, it might not seem possible that a heavy metal like steel can float so easily in the water, but steel ships' ability to float comes from a proper balance between the acting forces of gravity and buoyancy. Gravity does indeed pull downward on the ship, but the equally strong buoyancy force keeps it afloat. The theory behind the buoyancy force comes from the Archimedes' principle, which states "any object, wholly or partially immersed in fluid, is buoyed up by a force equal to the weight of fluid displaced by the object." Essentially, the greater volume of water displaced, the strong the buoyancy force. This helps explain why some ships sit higher on the surface of the water than others.