A block of iron sinks in water, but floats in mercury, this is because:
Density of water < Density of mercury
The sinking or floating of a body in a liquid is due to the difference in their densities. If the density of the body is greater than the liquid, then it sinks and vice-versa.
Density of water = 1 g/cc
Density of iron = 7.86 g/cc
Density of mercury = 13.56 g/cc
So, here the density of mercury is greater than water.