Cleansing action of soaps and detergents thus the soap molecules from structures called micelles. In micelles, one end is towards the mud particle and the other end which is ionic faces outside.
therefore, if forms an emulsion in water and helps in dissolving the dirt when we wash our clothes.