Every household has an electric meter that documents the amount of electricity the house consumes each month.
When you switch to solar energy, then you meter to also switch to net metering. A net meter works in two ways. First, it shows the utility company the amount of energy that your home consumes when the solar panel is not generating any electricity. Secondly, it shows the amount of power that your solar panel generated during the day.
Solar panels generate a lot of electricity during the day when the sunlight is strongest. Research has shown that most households in the US consume a lot of power during the night. This means that your solar panel is more likely to produce more power than you need during the day. If that is the case, then excess power is feed to the national grid. The utility company turn pays you by lowering your electricity bill based on the amount of power you feed onto the grid each month.