The type of fatty acid and length of the carbon chain determines the unique properties of various soaps.
Tallow or animal fats give primarily sodium stearate (18 carbons) a very hard, insoluble soap. Fatty acids with longer chains are even more insoluble. As a matter of fact, zinc stearate is used in talcum powders because it is water repellent.
Coconut oil is a source of lauric acid (12 carbons) which can be made into sodium laurate. This soap is very soluble and will lather easily even in sea water.
Fatty acids with only 10 or fewer carbons are not used in soaps because they irritate the skin and have objectionable odors