When grease or oil on the cloth comes in contact with soap solution, the stearate ions arrange themselves in such a way that its hydrophobic part is in the oil (or grease) and the hydrophilic parts project outside the grease droplet like bristles.
As the hydrophilic part is polar, these polar groups can interact with the water molecules present around the oil droplet which is pulled away from the surface of the cloth into water to form ionic micelle. Thus, soap helps in emulsification and washing away of oils and fats. The negatively charged sheath around the globules prevent them from coming together and forming aggregates. It is then washed away with the excess of water.