How does the Solar Energy System Work?

In one sentence, Solar Energy System works by harvesting solar radiation from the sun, using the solar panels on your roof, and converting it into usable electricity through the inverter.

There are 3 main components in the Solar Energy System:
Roof System, Solar Panel and The Inverter.

ROOF SYSTEM
The roof is the base of the Solar System as Solar Panels are usually placed on the roof. To achieve the best results, you should have a site with no shade on the panels, especially during the prime hours – 9am to 3pm.
roof
solarpanel
SOLAR PANEL
Solar panels are made out of many solar cells, and multiple solar cells when wired together, will form a solar array. Solar panels (or ‘modules’) are what captures the energy released by the sun in the form of photons. Solar panels contain PV (photovoltaic) cells that consist of a positive and negative layer of silicon, which would create an electric field. When photons hit the panels, they knock the electrons loose from the silicon atom. The negatively-charged free electrons will naturally be attracted to one side of the silicon cell, which creates an electric voltage. However, the electricity produced at this stage is DC (direct current), so it must be converted to AC (alternating current), in order to be utilized by your home or business
THE INVERTER
A solar inverter turns the DC electricity generated by the solar panels into 230-volt AC electricity, that can be utilized immediately by connecting the inverter directly to a dedicated circuit breaker in the electrical panel. Whenever you are producing more electricity from your solar electric system than you are immediately utilizing, your electric utility meter will turn backwards! Moreover, inverters also provide ground fault protection to prevent you from getting electrical shocks, system statistics including voltage and current on AC and DC circuits, maximum point tracking, as well as energy production.
inverter

References:

Greentech
mpia
suruhanjayatenaga
Greentech
mpia
suruhanjayatenaga