How do solar panels work?

Solar panels contain solar cells that capture sunlight and convert it into direct current (DC) electricity. An inverter then converts this into alternating current (AC) electricity for use in your home.