When atoms bond but…
So, hydrogen (H) is bopping along with one electron and it comes up to an oxygen that is missing two electrons. They decide to get together and form a covalent bond. BUT oxygen is greedy!
Oxygen's greed causes it to hog the electrons! Most of the time, all of the electrons are around the oxygen atom, leaving that part of the molecule negatively charged. As a result, the hydrogen part of the molecule is positively charged (since its electrons are being hogged by oxygen).
So, with the hydrogen side of the atom positively charged and the oxygen side negatively charged… Well, opposites attract! That's right! The electrostatic attraction between different poles of the molecule cause the atoms arrange in certain ways.