Photosynthesis occurs in two stages: 1) chlorophyll captures energy from sunlight to power the process, and 2) the plant uses this energy to convert carbon dioxide and water into oxygen and sugars. The sugars are used by the plant for food or stored for later use, while the oxygen enters the atmosphere. Photosynthesis thus benefits both plants themselves as autotrophs and other organisms as heterotrophs.