A simple circuit which we can use to illustrate the NOT function. when the switch is open, the transistor is able to conduct and current will flow through the lamp. But if the switch is closed, the transistor will have no forward bias and will be cut off, extinguishing the lamp.
Introduction to Digital Electronics p. 8 fig 3.