Ice is the solid state of water and we usually see it floats in bodies of water. The reason for this is their densities. First, let us first talk about the effects of densities in floating as general.
Suppose you have a solid A and liquid b getting into contact with each other. If solid A has more density (mass per unit volume) compared with the liquid b, it will sink. On the other hand, if solid A has lesser density compared with liquid b, it will float.
Ice has lesser density compared with the liquid water. This is unusual because most substances have higher densities when solidified. The reason for this phenomenon is the hydrogen bond that enables the frozen water or ice to have structure that makes it occupy more space and form crystalline lattice structure.