1) Soap is a chemical derived from a process called saponification, which causes an animal or vegetable fat to react with soda to create soap and glycerol, another name for glycerin.
Oil is when the fat is liquid at room temperature, fat when it is solid (see the difference between butter and oil in the kitchen).
2) This glycerin is washed to remove it from the soap, but there is always some, it is impossible to get rid of it 100% because this reaction is incomplete, we speak of chemical balance. (That's why we have an equal sign and not an arrow on this reaction).
3) Glycerin (or glycerol) clogs the cloth diapers, lodged in hydrophilic fibers (which love water, i.e. the textile fibres responsible for the absorption power of our cloth diapers), and by making hydrogen bonds with them, which diminishes their absorbing power. The urine can no longer bind to the fibers, and at the end, it slides on the tissue which becomes as waterproof.
Some oils, such as coconut oil or palm oil, produce more glycerin than others, this is related to the saponification index of oils.
4) When the inserts have been too dirty, a shock treatment, called stripping, must be done in order to return to zero, with clean fibers and rid of glycerin.
Be careful the stripping does not remove only the glycerin, that is why we speak of stripping also in situations of bad routine not involving soap.
Text (in french) by Clarisse Potriquet Pruvot, published with her permission.