When soap is agitated in water, structures called micelles are formed.
Soap is comprised of phospholipids, which have a polar end and a non-polar end. The polar ends, these being the phosphate heads of the phospholipid structure, are drawn to each other in a certain configuration, whereas the lipid (fat molecule) ends have a balanced non-polar structure such that they are neither drawn to nor repelled from each other.
Water, like the phosphate heads in soap molecules, consists of polar molecules that are drawn to each other. So when water (a polar substance) is agitated with lipids (which are non-polar substances) and soap particles (polar at one end and non-polar at the other), the water and phosphate heads of the soap particles are drawn together forming spherical micelle particles.
A bi-product of this action, and the key to how soap disperses fats in a water solution, is that the lipids/fats that are suspended in the agitated water solution are collected into the center of the soap micelles.
Essentially they are forced out of the way of the polar substances (the water and the phosphate heads of the soap molecules) and collect on the inside of the micelles.
They are neither drawn to nor repelled by the lipid ends of the phospholipid structure of the soap, but nevertheless end up in their vicinity (inside the micelles) because of the dominant polar environment of the solution of water they are in.