Starch consists of long, tightly coiled chains of sugar molecules, packed into tiny, dense grains. When cold, these grains are packed closely together and barely absorb water.
When the liquid is heated, water penetrates the starch grains, the structure loosens, and the grains swell dramatically – a process called gelatinization. In doing so, they can bind many times their original volume in water.
Because the swollen starch grains and the released chain molecules get in each other's way and form a loose network, the liquid can no longer flow freely – the sauce becomes thick or firm. This effect usually intensifies further as it cools.