To add on to this overview, there are a new class of inverters in research called grid forming inverters which don't just follow the rest of the grid. One interesting technique is they can simulate the inertia of a traditional rotating machine/generator.