I have a question about plug in solar panels 🙋‍♀️

Looking the ones available in Europe, the idea seems to be solar panels -> micro inverter-> plug into wall.

I feel like I’m missing something fundamental about household circuits. Why / how does plugging a power source into a normal plug socket work? And second question, would it work the same in the UK?