Cells get energy from food through cellular respiration or fermentation. Photosynthesis captures energy from sunlight and converts carbon dioxide and water into oxygen and glucose, which plants use for energy and animals obtain by eating plants. Cellular respiration breaks down glucose to release energy, using oxygen and producing carbon dioxide. When oxygen is scarce, cells use fermentation to break down glucose without oxygen.