Though soap also has these properties, soaps in general are not considered a detergent. Soap is a particular type of surfactant that is derived from oils and fats. They are created through the saponification process whereby the ester linkage in a vegetable oil or fat is hydrolytically cleaved creating a fatty acid (i.e. soap).
Both detergents and soaps are considered to be surfactants. Surfactants that are not soaps are considered to be detergents. Detergents are also commonly known as any cleaning mixture containing surfactants.