text: Detergent is a wetting agent and allows water to wet and dissolve matter that ordinarily resists water such as oil and grease.  Soap is not only a wetting agent but once it surrounds a particle of dirt it forms a film with charged soap molecules aligned such that the entire particle (soap and all) seems like it has a single charge.  Since like charges repel, all particles repel each other and the surface being cleaned and easily rinse away.  Soap and detergent therefore differ in the way they work.  Of course, soap and detergent can be mixed together to do a better job.