In a grid-tied system, solar modules convert the sun’s energy to DC (direct current) electricity. An inverter converts the DC electricity to household AC (alternating current) electricity. The AC electricity is then fed into the electrical system of the building. That AC electricity is either immediately consumed or exported to the grid to be stored for future use.
Some systems use batteries to store electricity, typically if the location is remote or if the owner prefers to be independent of the utility grid. This is called an off-grid system and works in basically the same way except for where the energy is stored.