The molecules of water (or other liquids) attract each other, which is why it’s a liquid and not a gas (where the molecules disperse to occupy the entire volume of the room available to them). They basically stick to each other. So this stickiness causes [surface tension](https://en.wikipedia.org/wiki/Surface_tension); the molecules in a glop of liquid will try to stick together as closely as possible.
And the shape with the biggest volume (inside) but the smallest surface is a sphere. The wiki article explains the forces that act to “pull the edges in” to form a sphere.
Latest Answers