The carbon cycle and the oxygen cycle (both involved in respiration), which are interrelated, are closed and apparently simple cycles.
Carbon dioxide is produced by breathing (respiration of all the living organisms like humans, animals, and even plants, breaking down organic molecules) that consumes oxygen and is reused during photosynthesis (in plants with chlorophyll only) during which carbon dioxide is absorbed, and oxygen is released with a formation of an organic molecule.