surfactant refers to a class of compounds that can reduce the surface tension of liquids, or the interfacial tension of liquid-liquid and liquid-solid phases.
Its name surfactant is a compound word of surface active agent , meaning "surfactant is a substance that can enhance the activity of the surface (or interface)".
Soaps commonly found in everyday life are typical surfactants. Soap can be used to wash clothes, skin surface stains, and water alone is not easy to wash off,
because oil is insoluble in water. So why can soap remove oil stains? This is due to the "two-faced" nature of surfactants.
The ingredients of soap are fatty acid metal salts, which dissolve easily in water, we call "hydrophilic groups."
The other is insoluble in water but soluble in oil, which we call "hydrophobic groups" or "oleophilic groups". Because of this special structure,
soap can plunge one end into water and the other end into oil. In this way, the water pulls on the soap molecules, and the soap molecules pull on the oil,
and the oil is pulled off the clothes!
Surfactant molecules have both hydrophilic groups and oil philic groups, which is also called "amphiphilic".
Because of this property of surfactants, at the right concentration, they can form micelle in water  : the hydrophilic head is attracted outward by water,
and the oil-philic tail is repelled inward by water. In the process of washing clothes, the oil stain is pulled into the interior of the micelle by the oil-wet group,
and the entire micelle is carried away by the water. If they are in an oily environment, they can form an inverse micelle, that is, the head inside and the tail out.
These micelles play an important role in cosmetics.