There are two basic types of solar electric systems: grid-tie and off-grid.
How does a Grid-Tied Solar Photovoltaic (PV) System Work?
Whether your system is being installed for residential, commercial, government, or agricultural use, the principles behind the system are fundamentally the same. A system consists of three basic components, the array of PV panels along with their mounting structure, the ac-dc inverter, and the electric grid. The grid is a fancy way of saying the electrical service provided by the utility company.
The PV panels are the components that actually generate the electrical current. Photons from the sun hit the panels and excite electrons in the PV material. The electrons begin to flow and this creates an electric current. The panels are most often mounted on an existing structure to form a rectangular array or grid pattern. The structure is usually the roof of the building, covered parking area, or garage, but it may also be a freestanding structure with the specific purpose of supporting the panel array. Sometimes people use PV arrays as shade structures over their patios and decks. The critical design feature is to select a location that receives minimal shading.
The DC current generated by the PV array next flows to the inverter where it is converted into AC current. Alternating current is the kind used in your home or business. Inverters may be configured to produce single phase 120/240 volt current commonly used in your home or 3-phase current commonly used in commercial and industrial applications.
The final component of the system is the grid itself. The grid acts like a battery storing the excess electricity generated by your system. The energy you generate (but do not use) is pumped back into the grid for future use just as if the grid were a big battery.
The actual consumption for which you are billed is calculated by taking the total kilowatt-hours you consume minus the total kilowatt-hours you produce. You only pay for the net amount that you consume. This is the origin of the term "Net Metering" that you may have heard of.