A detergent is a type of surfactant that is used to remove dirt and oil from surfaces, typically by forming micelles that encapsulate the dirt particles and allow them to be washed away.