Cohesion is the attraction between molecules of the same type, such as water molecules. Water molecules have an overall neutral charge but are polar molecule. An oxygen atom in one water molecule has a partial negative charge that can bind to a hydrogen atom with a partial positive charge in a second water molecule, forming a hydrogen bond. Each water molecule can form up to four hydrogen bonds with other water molecules. Hydrogen bonds are responsible for water's cohesive nature.
On a surface, when multiple water molecules come together through cohesion, a droplet is formed. Water does not typically spread out across the surface because the water molecules are more attracted to each other than to the molecules that make up the surface or the surrounding air. The attraction between the water molecules on the surface and the bulk water is called surface tension.
Surface tension results from cohesion. Pond skaters, also known as water striders, are insects that use this phenomenon to walk on water. Surface tension occurs at the interface between water and air (i.e., the water's surface). Water molecules at the surface interact with neighboring water molecules beside and below them. Since the surface water molecules cannot form hydrogen bonds with other water molecules on one side (the side next to the air), they form stronger interactions with their neighboring water molecules. The strongly-bonded molecules have a compressed surface area, creating spherical droplets of water molecules. The high surface tension of water and the buoyancy of the pond skater's legs enable the insect to remain on the water's surface.
Mercury is another cohesive liquid. In a glass container, mercury remains in spherical droplets because the cohesive forces between mercury molecules are stronger than the adhesive forces between the mercury and the glass. In contrast, although water is highly cohesive, it also has an affinity for silica (a main component of glass). So, water disperses evenly at the bottom of a glass container.
This text is adapted from Openstax/Chemistry-2e/section 10.2; Properties of liquids