Soap lather is the result of tiny atom chains that are created by the hydrophobic tails of soap when they react with air. This part of atoms turn their properties away from water and begin to react when they interact with another substance.
Soap has two parts, according to Belle's Botanicals, a leading natural process soap making company. The water fearing (hydrophobic) tail and the water loving (hydrophillic) head. These work together to remove the dirt and oil that accumulate on the surfaces that they are cleaning.
Many properties go into making soap, but the majority of soaps have at least some type of oil and some type of detergent in them. The oil works to get rid of the dirt and grime, while the detergent works to help get rid of the oil and at the same time carry away the dirt the oil has accumulated.
Soap is used in many different applications, because water alone cannot always get rid of dirt. It is not able to cut through grease and oil the way detergent is, but detergent needs water in order to work properly. Since detergent needs water to be able to work in the way it should, it is generally recommended that soap be mixed with water before it is used.