When voltage is present at the input, the transistor turns on, allowing current to flow through the collector-emitter circuit directly to ground. ... In this way, the output is HIGH when the input is LOW and LOW when the input is HIGH. A transistor NOT gate assembled on a breadboard.
A NOT gate simply inverts its input. If the input is HIGH, the output is LOW, and if the input is LOW, the output is HIGH. Such a circuit is easy to build, using a single transistor and a pair of resistors.