When does a transistor act as a switch?

When we use a transistor as a switch, we will be operating it in either an "all on" or an "all off" mode. Depending on the transistor, we'll just apply some "maximum" base voltage to drive it into saturation and allow for maximum collector current, or we'll not apply any base voltage and the device will not be conducting any current through it. That's the "on and off" of it. This idea applies to the "standard" transistor. Things change a bit for FETs and some other devices, but the concept of using the device in an "all on" or "all off" state is common to the application of all devices acting as switches. We either turn them "all the way on" or "all the way off" via the base, gate or applicable terminal of the device.