They have a process called Photosynthesis and Cellular Respiration
Plants take in carbon dioxide and water as well as sunlight energy, which is captured through a green pigment in chlorophyll on the leaves of plants.
The sunlight, water, and carbon dioxide enter a plant cell and travel into the chloroplast organelle. Here, the water with the help of sun energy separates to make hydrogen. This hydrogen the goes to the next step in where hydrogen and carbon dioxide create oxygen and glucose.
Glucose is a type of sugar, and an important one. It can be put in a storage and be used later. But It can also be sued for cellular respiration to make energy. This glucose is basically our food.
Now I understand it! But how do organisms make power for themselves?
That's where cellular respiration comes into the play. I can explain it to you.