The hydrophilic part as the name suggests, is the water loving part and hence is attracted towards water. While the hydrophobic part has affinity towards the dirt/oil/grease and hence the detergent binds to both the components which causes cleaning action when the surface is rubbed.