This is an inverted output converter with the output voltage being > or < the input voltage according to the duty ratio chosen.
The circuit diagram is shown above. When Switch is ON, inductor stored energy. Diode isolates input from the output. Capacitor supplies the load. When the switch is OFF, the inductor stored energy charges the capacitor and supplies the load through the diode. As the inductance polarity is reversed when it transfers power, the output has a reverse polarity compared to the input.
When the switch is closed Vin = L(di/dt)
(di/dt) = Vin / L
Di = tON (Vin/L)
When the switch is OFF, Vo=L (di/dt)
Di = tOFF (Vo/L)
Therefore, (Vo/Vin) = (tON / tOFF) = D/(1-D)
Where D is the duty ratio.
The waveforms of the buck-boost converter are shown below: