During the day when the sun is shining and your solar panels are generating electricity, the excess energy is fed back to the grid, banking credit for you as your meter actually spins backwards.
Then at night, you simply draw whatever power you need right back from the grid. If your system is of sufficient size and produces more power during the day than you use in the evenings, you may actually end up with a surplus of electricity.
In this case, many electric companies offer a program which is commonly known as "net metering" wherein, if your system produces more than you use, you will be paid a pre-determined amount of money for each kilowatt hour your system produces.
Yes! You could actually get a check from your power company instead of sending them one!