transistor working in saturation and cut-off region acts as a switch.in saturation emitter and collector are almost short ckt. and in cut-off they are open ckt. so by applying input to emitter,output to collector and proper control voltage to base of transistor,it acts as a switch.