Where does CO2 originates?

Burning fossil fuels, like wood, coal, petrol, gas. The "C" attracts 2-Oxygen and forms CO2.