Those tails are called hydrophobic. You can note the etymology: hydro= water, phobi = fear, aversion, dislike.
Phospholipds' tail is a long non polar chain, made of Carbon and Hydorgens, that rejects water (a polar solvent) and is attracted to non-polar compounds (oil for example). That is why that tails can atract dirt.