They help to retain moisture and make toothpaste creamy and squeezable. Glycerin and sorbitol are two common humectants. Glycerin, also called glycerol, is a by-product of soap manufacturing. Sorbitol is found in some berries and fruits. Both are alcohols that may be synthetically produced, mix with water, are odorless, and sweet tasting.
Most toothpastes contain glycerin which acts both as a plasticizer and a moistening agent.
Now, let's use our imaginations to understand the purpose of some other important materials in toothpaste. Picture an ocean, with its sandy beach, foaming surf, and some seaweed which has washed up on this beach. Each of these represents some components of the toothpaste. When you clean your teeth, the action of rubbing toothpaste against your teeth produces a foam similar to that produced at the beach. Brushing activates a detergent called sodium lauryl sulfate.