Carbohydrates are formed in leaf by the process called photosynthesis.
CO2 and H2O are used to form glucose in the presence of sunlight and chlorophyll.
6CO2 + 12H2O-------------------------->C6H12O6 + 6O2 +6H2O
chlorophyll and light
Here glucose formed is carbohydrate which is stored as starch in the cells of the leaf.