Soap films are thin layers of liquid (usually water-based) surrounded by air. For example, if two soap bubbles come into contact, they merge and a thin film is created in between. Thus, foams are composed of a network of films connected by Plateau borders. Films are used as model systems for minimal surfaces, which are widely used in mathematics.
Daily experience shows that soap bubble formation is not feasible with water or with any pure liquid. Actually, the presence of soap, which is composed at a molecular scale of surfactants, is necessary to stabilize the film. Most of the time, surfactants are amphiphilic, which means they are molecules with both a hydrophobic and a hydrophilic part. Thus, they are arranged preferentially at the air/water interface (see figure 1).
Surfactants stabilize films because they create a repulsion between both surfaces of the film, preventing it from thinning and consequentially bursting. This can be shown quantitatively through calculations relating to disjoining pressure. The main repulsion mechanisms are steric (the surfactants can not interlace) and electrostatic (if surfactants are charged).
Moreover, surfactants make the film more stable toward thickness fluctuations due to the Marangoni effect. This gives some elasticity to the interface: if surface concentrations are not homogeneously dispersed at the surface, Marangoni forces will tend to re-homogenize the surface concentration (see figure 2).
Even in the presence of stabilizing surfactants, a soap film does not last forever. Water evaporates with time depending on the humidity of the atmosphere. Moreover, as soon as a film is not perfectly horizontal, the liquid flows toward the bottom due to gravity and the liquid accumulates at the bottom. At the top, the film thins and bursts.
From a mathematical point of view, soap films are considered as minimal surfaces. See for instance the approximate numerical method for minimal surfaces form finding at Stretched grid method. Surface tension, which measures the energy needed to create a surface indeed acts as a physical surface minimizer: since surface energy is proportional to the soap film surface, the film deforms to minimize its surface and, thus its energy.