Here's what happens:
* Melting: Initially, the sugar melts into a clear, viscous liquid.
* Dehydration: As the temperature rises, the sugar molecules lose water molecules, leading to a concentration of sugar molecules.
* Decomposition: The sugar molecules break down into various compounds, including caramel, a brown, flavorful substance.
* Polymerization: These breakdown products then react with each other, forming complex molecules that give caramel its characteristic color and flavor.
The thick liquid you see is a mixture of these caramelized sugar compounds.
Important note: Caramelization is a chemical change, meaning the sugar is transformed into a new substance with different properties.