Surface tension is a property of the surface of a liquid. It is what causes the surface portion of liquid to be attracted to another surface, such as that of another portion of liquid (as in connecting bits of water or as in a drop of mercury that forms a cohesive ball).
Separation of oil and water is caused by a tension in the surface between dissimilar liquids. This type of surface tension is called “interface tension“, but its physics are the same.