Hydrogen bonding occurs between hydrogen and strongly electronegative atoms like F,N,O. In water or ice hydrogen bonding occurs as there is hydrogen as well as oxygen both are present. Water has 2 hydrogen atoms and 1 oxygen atom. The oxygen of one water molecule has two lone pairs of electrons, each of which can form hydrogen bonds with hydrogen on other two water molecules.
Each water molecule is H-bonded to 4 neighbouring molecules.