Water is a covalent compound. It consists of two hydrogen atoms covalently bonded with the oxygen atom at the centre. In water molecule, the central atom goes SP3 hybridization. According to VSEPR theory, it should have tetrahedral structure but the presence of two lone pair of electron in oxygen increases the repulsion between the H atoms and its shape becomes distorted tetrahedral. The HOH bond angle decreases from 109.5o to 104.5o.
Due to the strong electronegative character of oxygen, water molecule is highly polarized. Therefore, there is a formation of intermolecular hydrogen bonding between oxygen of one molecule and hydrogen of another molecule. The extra energy is required to break this molecular bond. Due to this strong association between the hydrogen and oxygen, water molecules become liquid and solid at room temperature. In the absence of hydrogen bond, water would be in gaseous state as that of H2S. This is the reason for H2O being liquid at room temperature while H2S is gas at same temperature while both of the compounds have similar bonding. This is also the reason for anomalous behaviour of water.
Scientist studied that water molecules in ice are arranged in such a way that they form open cage like structure with vacant space due to hydrogen bonding as shown in figure below. With the vacant space, the volume of ice increases. So, as volume has inverse relation with density. Ice has lesser density in compared to water and hence float in water. The figure above shows the arrangement of molecules in ice and water respectively.