|A special custom dessert by way of Chris Leung, Kata Robata, Houston, TX|
In cooking, the gold standard gel forming agent is gelatin, although gels can be made from a number of different compounds, from agar to gellan to alginate. In general, compounds that make gels tend to form long stringy molecules. Gelatin, for example, is derived from boiling animal bones (yes, it isn't vegan), which dissolves out collagen - the long stringy protein responsible for cartilage and making the matrix for bone to grow in. As long as the liquid is hot, the proteins stay dissolved - at a high enough concentration, this provides viscosity to the liquid, and a pleasant mouthfeel that is the hallmark of slow cooked stock. The long stringy nature of collagen is also why powdered gelatin needs to be "bloomed" in cold liquid first, it takes some time for water to penetrate the molecules. Incidentally, in chemistry parlance, this state is called the sol state, when the water surrounds the collagen molecules.
But as the liquid cools down, the collagen molecules start tangling with each other, forming a really fine 3-D meshwork - something like a molecular scale sponge. The little gaps in the mesh holds small bits of water, and now the situation is reversed: the water is surrounded by collagen molecules. This, then, is the gel state. In the case of gelatin, the two states are interchangeable depending on the temperature - at a high enough temperature, it's a sol, and at low temperatures, it's a gel. Other gels, like alginate, the tangling is catalyzed with calcium, and is not reversible. So, once an alginate gel is formed, it's not going back to the sol state even if heated.
Gelatin is highly desirable because it reverts to a sol state at body temperature, literally melting in the mouth to release flavor from the trapped liquid. Also, since it is made of protein, it is simply digested. But, being so digestible is also it's weakness - certain fruits like pineapple and papaya are rich with protein digesting enzymes (wrapping meat with papaya leaves is an old meat tenderizing technique), and they will destroy the gel-forming capability of gelatin. Fortunately, these enzymes can be inactivated by heat, so cooking the pineapple (or using canned pineapple) will permit its use in those jiggly fruit cups.