During photosynthesis, plants take in carbon dioxide and water, disassemble the molecules and convert them into sugar and oxygen. The water molecules are split into hydrogen and oxygen, and the hydrogen joins carbon dioxide to create sugars. The excess oxygen is released into the atmosphere during the respiration cycle.
Inside the chloroplasts of green plants are pairs of structures called grana and stroma. When light strikes chlorophyll, the energy is captured and sent to the grana, where it is used to split water molecules. The remainder of the energy flows to the stroma, where it creates sugar molecules. These carbohydrates are carried to the plant's cells, while the excess oxygen and water vapor byproducts are purged from the plant's system.
Plants produce an enormous amount of oxygen, and scientists believe that the evolution of plants is what gave Earth the oxygen in its atmosphere in the first place. In addition, many species of plants filter not only carbon dioxide, but harmful molecules like benzene, toluene and formaldehyde from the air. The right mix of houseplants could allow a human being to survive in a completely sealed environment, or help improve the quality of air and reduce pollutants in a normal household.