Dear student,
In an ecosystem, energy enters in the form of solar energy or light energy from sun. Solar energy is transformed into various other types of energies like kinetic energy, chemical energy, potential energy, etc. Out of the sunlight, plants absorb 1 per cent of the total energy to perform photosynthesis. Humans use sunlight to produce Vitamin-D. Animals also partially use sunlight.
Natural process by which CO2 returns to atmosphere is Photosynthesis. While, the man made process is combustion (Fire).
Regards.