A Simple circuit to show how a Transistor can be used as a Switch and Drive various outputs.
Logic Train is input signal which controls the Transistor.
When ever the Base of Transistor gets input voltage, Current from Collector is grounded through Emitter thus completing circuit for LED.
This kind of configuration is used in many application where any output like LED, Buzzer, or Relay has to be controlled using external input signal.