system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5 How can surplus energy generated by my home's solar panels go 'back into the grid'?

We have solar panels that can produce energy we don't need and gets fed back into our local energy grid. I don't know much about electrical systems but I assume they are one - way. For example the plug socket in my wall to my TV can only distribute power, I can't plug a generator into it and feed power back into it. Does every house have an 'in' system to feed the house but also an 'out' system to go back to the grid?

Thanks for all the answers, it's clear I assumed massively wrong!
gpt
Power does not “flow” through wires in the sense that it only goes one way. It is a constant charge. You can technically plug a generator into any outlet and power your house, however this is illegal in most places because if not done correctly you will send power to the grid, which may kill a lineman trying to restore power. Solar panels when set up correctly back feed into the grid, but they have automated switches so if the power goes out they disconnect.