Solar Panels collect DC energy from the sun's rays. The inverter changes the DC current into an AC current that is usable for your home and powers it. The excess electricity is sent to your utility company through the grid tied connection. If you produce more than you use, then you only pay your utility companies connection fee, and you have achieved Net Zero through Net Metering.
We like to compare Net Metering to a bank account. When a consultation is done correctly, a 12 month electric average will be used. Some months you will produce more energy than you use. Those months that extra energy is stored with your electric provider. It's just like how you save your money at your bank. The months you use more energy than you produce, the electricity is given back to you at the same price that the electric company charges you. Like how your bank allows you to withdraw your saved money with no fees. When a proper calculation is done, you only pay your electric provider a grid tied connection fee which ranges in between $10 to $16 a month here in Central Florida. If you have a Smart Meter then your home is already solar ready. If you don't then the electric company will replace it with a bi-directional meter, so them as well as yourself can track and monitor what you are putting into the grid as well as what you are using from the grid. When you only pay for the connection fee, this is called a NET ZERO system.
Solar does not work after the sun goes down, or during a power outage. When the sun goes down you are able to get electric back at the same price from the electric company through net metering using your stored and accumulated excess energy. In an emergency power outage situation panels shut down, and quit powering your home. This is Federal Law and this is to prevent back feed from going back into the grid, and potentially injuring or killing a line worker. One way to bypass that situation to have power during emergency situations is through battery storage. When the power goes out, the battery continues to power the home from excess power accumulated from your solar panels.