The leaves are the part of the plant that produces food. The process of producing food is called photosynthesis, which requires sunlight, water, chlorophyll, minerals and carbon dioxide.
However, the leaves could not produce food without the rest of the plant. The roots draw up water and minerals, and the stem takes those two items to the leaves. The leaves need both the water and minerals to produce food.
During the process of photosynthesis, plant cells trap sunlight in the leaves. Sunlight is electromagnetic energy. The plant combines the sunlight with the carbon dioxide using the chlorophyll in the cells to make the transformation. In the process, both glucose and oxygen are formed. The glucose is what the plant uses for food while the plant releases the oxygen. The fact that plants transform carbon dioxide into oxygen is fortunate for humans because animals and humans do the opposite; they breathe in oxygen and breathe out carbon dioxide.
Leaves get their color from the chlorophyll. The colors in fall trees result when the tree stops producing so much chlorophyll, preparing to go dormant in the winter. In turn, other colors that were already present in the leaves begin to show up, including reds, yellows and oranges. They fall off because they would die on the tree if they stayed, which would cause a problem in the spring when the tree needs food again.