At a shorter distance, very strong repulsive forces become dominant because the outer electron clouds overlap. It becomes significant only when numerous atoms in one of a pair of molecules can simultaneously come close to many atoms of the other molecule. This can only happen if the shape of other molecules match. The shape of the molecule is a tetrahedral structure and there is an asymmetrical distribution of charge. The oxygen nucleus draws electrons away from the hydrogen nuclei, which leave the region around the hydrogen nuclei with a net positive charge and the oxygen nucleus with a two partial negative charges.
Water is a polar molecule as show in the figure below.
The positively charged hydrogen ion on water molecule tends to orient itself toward a negatively charged oxygen molecule of neighboring water molecule. Ice has a highly regular crystalline structure which has maximum number of bonds. Liquid water has less hydrogen bonds which are continually forming and breaking. Each molecule of water has an average of 3.4 bond while ice has 4. Water is highly cohesive which means it sticks to other water molecules.