The correct answer is - photosynthesis.
With the process of photosynthesis, the plants are creating sugars that are much needed for their development and growth. In order to be able to perform this process, the plants use carbon dioxide, which they extract from the air. The plants only the carbon, while the oxygen is of no use for them, thus they release the oxygen back to the atmosphere.