A helpful chart by Compound Interest explains the chemicals that give leaves their color both when they are green and when they change color in autumn.
Leaves are green because of chlorophyll, yellow because of a combination of carotenoids and flavonoids, red because of carotenoids combined with anthocyanins, and orange when only carotenoids are present. The chart is presented with detailed explanations of each of the different pigments.
image via Compound Interest
via Gotham Knowledge