Detergent breaks surface tension by disrupting the bond between water molecules. This is because detergent has opposite polar heads on its molecules.
The hydrogen and oxygen molecules in water form hydrogen bonds, which form a type of skin on the surface of the water. This skin is strong enough to support the weight of very light objects. That is why ants seem to walk on the surface of a body of water and why a needle carefully placed on top of the water will float.
According to the Nuffield Foundation, detergent molecules have a polar head on one edge that attracts water and a polar head on the other edge that repels water. These opposing heads interfere with the hydrogen bonds in the water molecules and weaken the strength of the skin on the surface, breaking the tension.