During the daytime, plants engage in photosynthesis, where they absorb carbon dioxide and release oxygen as a byproduct. At dusk, photosynthesis slows down or stops, and the plant switches to respiration, during which it absorbs oxygen and releases carbon dioxide.