The formation of CO2 is the essential part of releasing energy from Carbon. The burning of the fossil fuel produces flue gases that contain CO2. In the current scenario, all fossil fuel power plants emit this CO2 to the atmosphere.
Oxygen for the combustion comes from air. Air contains 23.2% by weight of Oxygen with the balance being mainly Nitrogen. During Combustion, the Carbon combines with Oxygen to form CO2. Therefore, the Flue gases that leave the combustion chamber contain CO2, Nitrogen and some unused Oxygen from the air. In a coal fired unit, typical values of flue gas will be CO2 12%, O2 around 3%, and the balance Nitrogen at 85%. (A typical natural gas fired gas turbine will have CO2 4%, O2 15% and N2 81%).