Inexpensive common commercial soap will not lather or dissolve in seawater due to high levels of sodium chloride in the water.
Soaps for cleansing are made by treating vegetable or animal oils and fats with a strongly alkaline solution.
In this reaction, the triglyceride fats are first hydrolyzed into free fatty acids, and then these combine with the alkali to form crude soap: a combination of various soap salts, excess fat or alkali, water, and liberated glycerol (glycerin).
The relatively high concentration of salt (sodium chloride) in seawater lowers the solubility of soaps made with sodium hydroxide, due to the common ion effect, a form of salting out.
In places that do not have freshwater or need to conserve it, cleaning can be done with the use of salt water and saltwater soap.