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. The polarity and hydrogen bonding of water makes water an excellent solvent for polar molecules. Water greatly weakens electrostatic forces and hydrogen bonding between polar molecules by competing for their charges.