Transistor connection
From the schematic, when the transistor is turned on, puts a short-circuit on the 12V rails.

The basic circuit to activate something with a transistor is







simulate this circuit &ndash; Schematic created using CircuitLab

In the figure, shown as an LED may be activated with an NPN transistor, connected to the PWM control output.
The main thing to keep in mind is that the transistor defines two parts of the circuit. The input circuit, where the PWM signal that activates and deactivates the transistor is connected.
The output circuit where the load (LED) and power supply that is used to activate the load is connected. The transistor operates in this case as a switch for closing the load circuit.
When the PWM signal is high, the transistor behaves like a closed switch. When the PWM signal is low, the transistor does not conduct.

In the schematic of photography, the collector is directly connected to the power supply of the LED, so that when the PWM signal is high, a short circuit occurs in the power supply.