Solar panels produce direct current power (DC). Our electrical grid system is an alternating current system. The electricity off the panels, therefore, goes to an inverter which charges DC / AC and connects to the poles and wires in your street.
If your solar panels are generating 2000w of electricity and you are using 1000w, at that point in time the surplus 1000w is fed back up the cable from your property and into the grid. This is called feed in and the tariff ranges from 6c – 8c per Kw/hour.