Can anybody explain how the inverter circuit works?
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. The equivalent circuit using a relay.


When the relay coil is un-powered the LED is lit.
When the relay coil is powered the contact closes and short circuits the LED. It turns off.


Note that the circuit is a little inefficient. Not only does it draw power when the LED is off but it draws more power in that condition as the full voltage is across R1.