Sunlight (photons) hits a solar panel, freeing electrons and creating DC electricity. An inverter changes this DC power to AC, which is usable in homes and businesses.

Image from Huawei inverter brochures
Sunlight (photons) hits a solar panel, freeing electrons and creating DC electricity. An inverter changes this DC power to AC, which is usable in homes and businesses.
Image from Huawei inverter brochures