If same mass of liquid water and a piece of ice is taken, then why is the density of ice less than that of liquid water?


In ice, molecules of H2O are not packed so closely as in liquid water. There exists vacant spaces in the crystal lattice. This results in larger volume and lower density (density=mass/volume).
In other words, density of ice is lower than liquid water and hence ice floats on water.