<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->
A soap molecule has two parts: the hydrophilic part (head) and the hydrophobic part (tail).
The hydrophilic part is attracted to water and dissolves in it. On the other hand, the hydrophobic end is water repulsive in nature and is attracted to dirt and grease.