With a connected installation the unused generated electricity will be transported back to the energy provider. When there is a shortage of electricity (at night for example) the energy provider will supply energy back to you. The difference between those two will be deducted later.
This is much cheaper than off grid.