For example, if a large amount of loads switch off, the system frequency decreases. In response to this, synchronous generators will produce more power to bring the frequency back to normal. This is as a result of the big spinning mass in the generator that wants to maintain its rate of rotation.
Synthetic inertia involves configuring control loops in the battery inverters to cause them to have a similar response to a synchronous generator. The bonus is that you can tune this control as much as you like depending on grid conditions.
So you get a clock, monitor the grid, calculate the current that would be drawn from a short-circuited dynamo right now, and get the inverter to generate that current, all within a few microseconds, and without setting the battery on fire? I'm impressed.
Conventional Generators have enormous energy stored in their rotating parts, and the grid ties all these generators together as if they were on the same shaft. This maintains the phase and frequency of the grids electricity by providing "synchronous momentum".
However this synchronous momentum is lost when the mechanical generators are switched off. And so giant batteries and inverters are used instead to provide this critical function.
To put it another way, the giant batteries are not used to power the grid, but instead used to lower the AC impedance of the grid, eg provide synthetic inertia.