The idea of voltage stabilization or the entire concept of a voltage stabilizer involves addition or subtraction of the voltage to and from the mains power supply. For this, the voltage stabilizer uses a transformer like a setup that is connected in various configurations and is armed with switching relays.
Many stabilizers have a transformer with taps on winding type configuration to deliver different voltage corrections while servo stabilizers use a thing called auto transformer which can handle the wide range of voltage related issues.
Let us now understand the boosting configuration where the polarity for the secondary winding is oriented in a way that its voltage is directly included with the main or primary voltage. So in the event of under voltage condition, the transformer is switched because of the relays or solid state switches in a way that additional volts are appended added to the input voltage. Therefore compensating for the loss of voltage.
In bucking configuration the polarity of the secondary coil is adjusted in a manner that it subtracts the voltage coming from the mains. Switching circuit here then shifts the connection to match the load in this configuration.