So with water, #"H"_2"O"#. The oxygen has two lone pairs of electrons and on top of this it is partially negative, making the hydrogen partially positive. The hydrogen bond is the bond formed from an oxygen atom in one molecule to a hydrogen atom in another molecule. Each oxygen has two hydrogen bonds while each hydrogen has one hydrogen bond. Hydrogen bonds happen with other covalent molecules with an electronegative atom. Like ammonia, #"NH"_3# and hydrogen fluoride, #"HF"#.
Hydrogen Bonding in Water:
Hydrogen Bonding in Hydrogen Fluoride