The cleansing action of soap is based on following principle.
(1) Soap dissolves in water to form soap micelles.
(2)Hydrophobic end of soap attracts dirt and grease. The hydrophillic end remains separated in water by the action of ion repulsion.
(3) Clothes are rinsed. These micelle are washed with water.