When granulated sugar is heated to a high enough temperature, it liquefies. Initially, the melted sugar is clear, but as it heats further, the liquid turns to a clear light brown syrup. The longer the syrup is heated, the darker the color.
When foods with natural sugars, such as apples, are heated, the sugars change in the same way. This is commonly referred to as caramelizing but is technically called the “maillard reaction.” This technique creates a concentrated, sweet flavor with a golden syrupy glaze. Fruits and vegetables that have a lot of natural sugars are easily caramelized.