Output receiving GND by activating the transistor
Figure 1. A standard NPN switch.

Feeding a current into the base of the transistor turns it on and current can flow from the collector to the emitter.

The emitter is connected to GND and the load - or in your case the pullup - is connected to the collector.

Be aware that the signal gets inverted. When OUTPUT switches high the collector is pulled low.