Hi Duncand123, Thank you for reaching out.
Any solar generated during the day will be used first before buying electricity from the grid. However, any excess energy is fed back to the grid.
When your solar system is generating energy, any power that is not being used with automatically be fed back into the grid as the smart meters do not store the solar generation.
You can find further information on our website https://www.agl.com.au/residential/energy/solar-and-batteries/solar-energy/solar-panel-installation