On my system they installed a power meter that goes both ways. It monitors the energy I use from the grid and it monitors the energy I send to the grid. When the solar panels make electric the system monitors the voltage from the street and then sends it from the panels to the breaker box at a slightly higher voltage. This higher voltage is like a switch as all of your energy devices will use the higher voltage first as it is more efficient and any unused energy is released into the grid. The energy sent back into the grid is a slightly higher voltage and your closest neighbors will use your energy before they use the energy from the power company.