When the input signal is high, Q2 is off, and no current flows through the high side of the load. The PNP transistor (Q2) is connected to the power supply voltage and the high side of the load.
On the other hand, when the input signal is low, Q1 is off and no current flows through the low side of the load. When the input signal is high, it turns on Q1, allowing current to flow through the collector-emitter path and providing a low voltage to the low side of the load. The input signal is connected to the base of the NPN transistor (Q1), which acts as a current amplifier. Here is the circuit diagram for the totem pole configuration: