Your circuit operates the NPN in common-base mode. By changing voltage at the emitter, it changes base-to-emitter voltage relationship, thus changing current level through base-emitter (and the degree to which the transistor turns On or Off).
Your signal must be low impedance, in the sense that it has to provide a path to ground when it is low. By doing that it pulls the collector leg (namely V_out) to zero V.
When your signal is high, it makes emitter voltage same as base voltage, and allows supply voltage (5V) to appear at V_out.