Water is a polar molecule, and polarity occurs when the electrons in molecules are not spread evenly. This causes on end of the molecule to be negative, while the other is positive.
A water molecule is formed by a combination of two hydrogen atoms and one oxygen atom. The hydrogen atom bonds to each oxygen atom with a pair of shared electrons. An oxygen atom also has two additional pairs of electrons. Overall, a water molecule has a neutral charge. However, because of the unequal arrangement of its electrons, the oxygen end is negative, and the hydrogen end is positive. Opposite charges are attracted to each other, so when there are lots of water molecules, they stick together.