Gelatin is a protein, made from the hydrolysis of collagen, a protein that makes up about a third of all mammalian tissue. Collagen is what makes up much of the connective tissue, tendons, and the protein part of bones.
Hydrolysis in proteins is the process of adding a molecule of water to break the bonds between some of the amino acids, thereby making the protein chains smaller.
Collagen forms a triple helix, where three chains of connected amino acids form weak hydrogen bonds between the double bonded oxygen atoms and the hydrogen atoms attached to the adjacent chain's nitrogens. The three chains then twist together like three cords in a rope.
In gelatin, when the triple helices are heated in water, they open up, and some of the hydrolyzed ends fray out to tangle with other ropes, and water is trapped in the strands. The result is a gel, a wiggly semi-solid mass.
Gelatin is very familiar as the gelling agent in Jell-O desserts. It is also used to thicken yogurt, sour cream, and ice creams, and is dried to form the dissolvable plastic capsules that make medicines easier to swallow.
Gelatin in its unrefined form is the hide glue used to hold violins together.
Gelatin is the binder that makes marshmallows possible, and is also what makes gummy bear candies gummy.