The design of the following system will look as follows
DURING THE DAY
DURING THE NIGHT
When the sun rays hit the panels, electrical energy is produced and converted into 50 Hz, 220/380 V by the inverter. The electricity produced feeds directly the needed load, and the surplus is fed to the grid. See About Net-Metering for more details.
During the night, you consume from the energy fed into the grid during the shiny days.