I have had this question throughout the time that I have been gardening. Where exactly does the carbon that goes into the plant structure? Is it like the nitrogen cycle? Does it come from the air? Is it from the ground? Is it a combination? I recently saw a presentation on soil where the roots go between the soil particles. Does it get some carbon there?
Generally, carbon dioxide enters a plant through stomata on the leaves - these are like small pores on the underside of the leaf with two guard cells which allow CO2 to enter, and oxygen to leave. Part of the photosynthetic process, and there's a formula for it - six molecules of C02 plus six molecules of water turns into 1 molecule of sugar (which the plant utilises) and 6 molecules of oxygen (which it emits from the stomata). The water comes from root uptake in the soil, but some water loss is inevitable through the stomata too.
Plants without proper leaves have stomata placed elsewhere (stems, for instance).