Water is a compound made of two atoms of hydrogen and one atom of oxygen. The hydrogen atoms are bonded to the oxygen atom by the sharing of electrons, called a covalent bond.
Because the electrons are not shared equally between the hydrogen and oxygen atoms, portions of the water molecule have partial positive or partial negative charges. Oxygen is a more electronegative atom than hydrogen, which means that oxygen attracts electrons more than hydrogen does. The slightly positive hydrogen atoms and slightly negative oxygen atoms cause molecules of water to bond with one another, creating the many hydrogen bonds present in water. These hydrogen bonds keep water liquid over a wide range of temperatures.