Gelatinisation is the process when starch grains do not dissolve in liquids and instead, absorb it, swell and break open when heated. The mixture thickens and is the start of the process. It occurs between 75-87ºC. When the thick liquid cools, it forms a gel will set.
Flour is an excellent source of starch. Starch is found in tiny grains in the flour and when mixed with a liquid and heated, it will start to thicken.
Amylose: causes sauces to thicken, turn cloudy when cooked and get even thicker as they cool.
Amylopectin: produces a clear gel when it thickens and has the same thickness hot or cold.
Different starches contain different amounts of these molecules.