Autotrophs are the only producers in ecosystem, which provide foods to all the other levels in the ecosystem. They produce their own food and not only for themselves, but for the decomposers and consumers as well. In the consumers also there are three categories, those are herbivorous, carnivorous and omnivorous and for all these categories the food base is produced by the autotrophs.
Example- The plant is the producer (autotrophs) and the plant is consumed by the deer that is the (harbivour) and then the deer is consumed by the lion that is a (carnivore) and then the lion is consumed by the (decomposer) those are bacterias and worms, etc.
Now how to use autotrophs create their own food? Basically all the green plants comes under this categories and as we know they produce their own food by the process of photosynthesis. In this process autotrophs take in substances from the outside and convert them into stored forms of energy. This material is taken in the form of carbon dioxide and water which is converted into carbohydrates in the presence of sunlight and chlorophyll. Carbohydrates are utilised for providing energy to the plants the carbohydrate within not used immediately are stored in the form of start with search as the internal energy reserve to be used as and when required by the plants.