Original: A ship will float even though it may be made of steel (which is much denser than water), because it encloses a volume of air (which is much less dense than water), and the resulting shape has an average density less than that of the water.
Simplified: A ship floats because although it is made of steel which is more dense than water, it encloses a volume of air and the resulting shape has an average density less than that of the water.