Water molecules are what are called dipoles: they have an electric 'pole' at each end of the molecule with opposite charges because the electrons in the molecule tend to congregate near the oxygen atom and away from the hydrogen atoms. Thus the negative part of one water molecule will attract the positive parts of other, nearby molecules. This is why water falls from the sky as raindrops, and not individual molecules, or why water tends to bead up on the hood of your freshly waxed car, or why you can cause water to bulge out over the rim of a glass if you fill it carefully; the molecules are all pulling together.
Water molecules are not only attracted to each other, but to any molecule with positive or negative charges. When a molecule attracts to a different substance, this is termed adhesion. Think about what happens when you dip one end of a piece of paper towel into a glass of water. The water will climb up the fibers of the paper, getting it wet above the level of the water in the glass. We know gravity is pulling down on the water, so why do they move up? Because the water molecules' positive and negative charges are attracted to the positive and negative charges in the cellulose molecules in the paper.
Note that both the examples above have both cohesion and adhesion occuring but one is stronger than the other. If the water molecules are more strongly attracted to each other than to the surrounding material, they bead up and try to get as close to each other as possible. If there is a stronger attraction to some other material, they spread out and try to get close to the other material.
Answered by: Rob Landolfi, Science Teacher, Washington, DC
'In a way science is a key to the gates of heaven, and the same key opens the gates of hell, and we do not have any instructions as to which is which gate.
Shall we throw away the key and never have a way to enter the gates of heaven? Or shall we struggle with the problem of which is the best way to use the key?'
Richard Phillips Feynman