A surfactant is a "surface active agent" that has a unique molecular structure with parts that love both water and oil - which allows it to mix with dirt, oil and impurities and to be effectively rinsed away.
There are four types of surfactants, anionic surfactants (powerful cleansers for skin and hair - see sulfates), cationic surfactants (most used in hair care as they help reduce static and improve slip), amphoteric surfactants (a gentle option that helps maintain the skin's pH) and nonionic surfactants (another gentle option, used in products where moisturizing is key). Surfactants can cause irritation to sensitive skin, so if your skin is more sensitive, seek out nonionic surfactants where possible.