Answer: Plants use the energy from the sun to "fix" the carbon in carbon dioxide (in the air) into simple carbohydrates (sugars). This process is called photosynthesis, and takes place only in green plants (with a few minor exceptions in microorganisms) and only in the presence of light. The reaction takes place in the plant's chloroplasts, which contain the green pigment chlorophyll.
Plants' basic needs include light, water, air, and minerals.
There are lots of books and web sites devoted to this subject, so I hope you'll explore it more in depth. An interesting one is the ASU Photosynthesis Center, web site: http://photoscience.la.asu.edu/photosyn/default.html Scroll down to the "Educational Resources" for some interesting links.
Also, NGA is now offering online botany courses for people who want to learn more about botany! We cover photosynthesis in-depth there. (Visit our web site at http://www.garden.org -- go to "Online Courses".)
Q&A Library Searching Tips