When water is heated, it evaporates. The molecules move and vibrate so quickly that they escape into the atmosphere as molecules of water vapor.
Plants go through a process called photosynthesis where they take in carbon dioxide from the atmosphere (as well as water and sunlight), and they turn it into oxygen (so we can breathe) and glucose (sugar)!