Surfactants are usually organic compounds that are akin to amphiphilic, which means that this molecule, being as double-agent, each contains a hydrophilic "water-seeking" group (the head), and a hydrophobic "water-avoiding" group (the tail).  As a result, a surfactant contains both a water-soluble component and a water-insoluble component. Surfactants diffuse in water and get adsorbed at interfaces between air and water, or at the interface between oil and water in the case where water is mixed with oil. The water-insoluble hydrophobic group may extend out of the bulk water phase into a non-water phase such as air or oil phase, while the water-soluble head group remains bound in the water phase.
The hydrophobic tail may be either lipophilic ("oil-seeking") or lipophobic ("oil-avoiding") depending on its chemistry. Hydrocarbon groups are usually lipophilic, for use in soaps and detergents, while fluorocarbon groups are lipophobic, for use in repelling stains or reducing surface tension.
World production of surfactants is estimated at 15 million tons per year, of which about half are soaps.  Other surfactants produced on a particularly large scale are linear alkylbenzene sulfonates (1.7 million tons/y), lignin sulfonates (600,000 tons/y), fatty alcohol ethoxylates (700,000 tons/y), and alkylphenol ethoxylates (500,000 tons/y).