Soap works by removing dirt, oil and bacteria from the skin, due to fatty acids in the soap that bond with oils. Soap can suspend oil, which can then be rinsed away.
Fatty acids consist of a hydrocarbon chain, with one end attracted to oils and the other to water. Grease and oil do not mix with water. However, soap acts as an emulsifying agent, which means that it is soluble in fat and water. Some soaps strip natural oils from the skin, causing dryness and irritation. Other soaps are mild and contain moisturizers that effectively rehydrate skin. The use of soap for personal cleansing dates back to the ancient Romans.