Hi folks,
I think all this confusion is because we, as engineers, have the tendency to model everything and, sometimes, forget to come back to the basics.
Also, we always keep trying to visualize mathematical entities as being physical entities.
In reality, there exist the electric and the magnetic filed, which can be associated to voltage (V) and current (A), respectively.
The other electrical engineering "quantities" (S (VA), P (W) and Q (var)) are derived mathematically from these two physical entities (V and A). These "quantities" are defined with base on alternating current (AC) systems with linear components and sinusoidal wave.
The best way to "see" if the vars is leadding or lagging is looking the angle between the voltage and current.
rmw, regarding to synchronous compensator (SC), it can be "visualize" as a voltage source generating a voltage that can be (a) higher, (b) lower or (c) equal to the voltage at the terminal on which it is connected.
In the case (a), the SC (over-excited) will "delivery" current (90 degree leading from the voltage) to the system as current flows from high to low potential (voltage). In this case the SC works as a capacitor.
Conversely, in the case (b), the SC (under-excited) will be "absorbed" the current (90 degree lagging from the voltage), as its voltage is lower than that on the terminal. In this case the SC works as an inductor.
In the case (c), no current will flow. The SC will be is "sleeping".
In all cases, some energy is consumed to supply the losses (friction, heating, etc), as davidbeach rimind us.
This same "picture" can be used for a generator, but in this case there will be a prime mover connected to the generator shaft.
Best regards,
Herivelto Bronzeado