Even though the density of iron is greater than water, a ship made up of iron floats in water. Why ?
The average density of a boat -- the combination of the steel and the air -- is very light compared to the average density of water.
Hence the amount of water pushed out of the way of the boat weighs more than the boat, so the boat is buoyant and floats.