The Pineapple Plant works by using the energy of sunlight to convert carbon dioxide and water into oxygen and glucose (sugar). This process is called photosynthesis. Oxygen produced during photosynthesis is released into the air, while sugar remains in the leaves for food production.