Pectin is a thickener and often acts as a gelling agent, stabilizer and humectant. It is very often used in the confectionery world in jellies, fillings, marmalades, sauces and the like.
Why is pectin used and not gelatin or agar-agar? It’s all about the desired results, namely the consistency that these gelling agents give. Pectin imparts a very natural viscosity that distinguishes confiture from jam, for example.