Photosynthesis is the process by which plants take in carbon dioxide and water, use energy from sunlight to turn these into carbohydrates, and release oxygen as a byproduct. During the day, plants carry out photosynthesis, taking in carbon dioxide and releasing oxygen to fuel their growth and provide oxygen for other living things. At night, plants switch to breathing in oxygen and releasing carbon dioxide like animals.