Gelatin is a water-soluble protein extracted from animal connective tissue. When a sufficient quantity of gelatin is dissolved in hot water or other liquid, the liquid will solidify when cooled or chilled. When used in smaller quantities, the liquid will thicken but not solidify.
Gelatin thickens and gels because of the nature of its proteins, which form long strands. When present in small quantities, the strands get tangled with one another, so the liquid does not flow as freely. When present in large enough quantities, the strands bond with one another to form a network that traps the liquid to keep it from flowing at all.