Leaves are loaded with chlorophyll, which makes them green. But all green plants also carry a set of chemicals called carotenoids. On their own, these look yellow or orange, (as you might guess from the name, carotenoids also give colour to carrots), but they’re invisible beneath the chlorophyllic green of a leaf for most of the year.
However in the Autumn, when the leaves are nearing the end of their life cycle, the chlorophyll breaks down, and the yellow-orange is revealed.
In addition to carotenoids most trees have also evolved to produce a different set of chemicals, called anthocyanins, when it’s bright and cold in autumn. These have a reddish tint. They’re also sometimes made in newly sprouting leaves, which explains their sometimes reddish tint. Where chlorophyll and anthocyanins coexist, the color of a leaf may run to bronze, as in ash trees. At high enough concentrations, anthocyanins will make a leaf look almost purple, as in Japanese maples.
So, there you are the beautiful burning colours of Autumn are all down to the chemical balances of chlorophyll, carotenoids and anthocyanins.