Saponification is a chemical reaction that occurs when an ester, such as a fat or oil, is heated with a strong base like sodium hydroxide or potassium hydroxide. This process results in the formation of a salt of a fatty acid, which is the main component of soap.