This is an effect seen when liquid meets air. The molecules in the liquid are more attracted to each other than they are to the nearby air. This makes them clump together at the liquid’s surface. Surface tension is what makes the surface of a very full glass of water look like it is covered with an invisible membrane. It’s also why some small insects can walk on top of the water — surface tension is just strong enough to hold them up.
In a sentence
Soap can disrupt surface tension by making it harder for the water molecules to bunch together.