Scenario 1: Net metering
sunlight hits the panels,creating DC electricity that ia sent to an inverter
the inverter is connected to the home's electical panel, and the solar power is used to power lights and appliances.
Excess elctricity is sent to the grid .
At night or when the sun isn't shining,the home is powered by elctricity from grid.
At the eng of the month ,the homeower is billed per kilowatt-hour(KWH) for their usage minus any solar energy sent to the grid.
Net metering is the gold standard method of solar billing.It ensures that solar owner get full credit for all the elctricity produced by their system.