Some homeowners opt for battery storage which allows them to capture and store the excess energy they are generating.
If you produce more electricity than you use, what happens to the excess depends on your solar array setup.
Most grid-tied homes push excess electricity back to the grid where it is used by others. These homeowners usually receive renewable energy credits for the electricity they push to the grid. More on that here. If you are not receiving credits for energy you are pushing to the grid, read this knowledge base article.
Homeowners who use battery backup have the convenience of using the stored energy at night when their solar panels are not producing energy and/or during power outages. More on that here.