How Does This NOT Gate Work?
Current only flows into the base of the transistor, not out. When the switch is closed, the circuit acts like this:







simulate this circuit &ndash; Schematic created using CircuitLab

LED2 is shorted out. With no voltage across it, it doesn't conduct. All of R2's current goes straight to ground.

With the switch open, the circuit acts like this:







simulate this circuit

The transistor is now off (no collector -> emitter current), so 6 volts is put across R2 and LED2 in series. This allows LED2 to turn on and conduct, with R2 limiting the current.