The slight positive charge on the hydrogen atom of one water molecule attracts the slight negative charge on the oxygen of an neighboring water molecule, creating a hydrogen bond.
The atom that loses an electron becomes positively charged, and the atom that gains an electron becomes negatively charged, attracting the atoms to each other and forming an ionic bond.
The oxygen and hydrogen atoms of a water molecule have very different electronegativities, with oxygen attracting electrons more strongly than hydrogen.
Ionic bonds form when one atom donates one or more electrons to another atom, with an electronegativity difference between atoms of very large magnitude (>1.7).
Waxes are a class of lipid that is particularly hydrophobic and is used in nature to form waterproof seals, such as the cuticle that stops leaves from drying out.