Each solar panel is has several individual photovoltaic cells (PV) consisting of semiconducting material.
When the sunlight hits this material, the energy is absorbed and flows out of the cells. This is called Direct Current electricity.
Next, the DC electricity flows to an inverter, where it is converted into Alternating Current.
Your home or business may use this power the same way electricity from the grid is used. Furthermore, any excess energy flows out to your utility company. In turn, your energy company may give you a credit on your electric bill.