This is a H bridge motor driver from discrete bipolar transistors.
The 12V is the external motor supply.
The square wave 3.3V supply represents a microcontroller output pin putting out a PWM/enable signal, which drives a NPN/PNP pair of transistor for high side switching off the positive rail.
The switched 3.3V supply represents a microcontroller pin putting out a direction select signal, driving a double inverter to generate two opposite levels to drive the H bridge (two inverters instead of just one to reduce the load on the microcontroller pin and make the H bridge drive circuitry symmetrical)
Those two signals drive opposite low side NPN and high side NPN/PNP pair switching transistors.