Soaps are metal salts of long chain fatty acids prepared from oils and fats, while detergents are sodium salts of long chain hydrocarbons made from petroleum. Soaps cannot be used in hard water as they form insoluble precipitates, but detergents do not form precipitates and can be used in soft, hard, or salt water. The document discusses the production, structures, cleansing actions and advantages/disadvantages of soaps and detergents.