The water molecule is a dipole, due to differences in electronegativity between oxygen and hydrogen and because it has an angular geometry.
I don't know why it attracts instead of repelling, although I'd guess it has something to do with being more energetically favorable. Since water is a liquid, the energy of breaking hydrogen bonds between the molecules and rotating might be less than the energy released when opposite charges come together.
Just an idea.