They Do So With Organelles Called Chloroplasts

You may know that your body is composed of many different cells that carry out various functions. Red blood cells transport oxygen throughout your body. Immune cells fight off pathogenic invaders, and skin cells protect you from harmful UV rays and other environmental agents that could harm you. And inside each of those cells are organelles, which carry out metabolic functions inside the cell.
Plants have differentiated cells, too, which carry out different functions to keep the plant alive and thriving. And inside their cells are organelles called chloroplasts. Chloroplasts capture the energy that comes in from the sun, convert that energy into a form that the plant can use, and store it.