A detergent is a surfactant, or a mixture of surfactants and detergents. Soaps are surfactants and detergents. Surfactants are compounds that lower the surface tension of of a liquid, like water, thus allowing easier spreading. Surfactants also lower the interfacial tension between two liquids or a liquid and a solid. In most household contexts, the term detergent by itself specifically refers to a laundry detergent or a dish detergent, versus hand soap or other types of cleaning agents.
Detergents are classified into three groups according to the charge the surfactant has. Those three groups are 1) anionic, 2) cationic, and 3) ethoxylates. Detergents are commonly delivered as powders or liquids.