The above answer has covered most of the aspects, i would like to elaborate a bit. The operation of transistor is not similar two the mechanical switch where there are just two states and both of them are valid. In transistor we have three states of operation and we consider only two of them in switching operation which does not mean that during the switching application active mode just goes away to a different place.
During switching, going through the active stage makes the switch work in both saturation ad cutoff region.
And talking about how this happens, as a BJT is a voltage controlled device, ll this depends on the voltage between EBJ (Emitter Base Junction) and CBJ (Collector Base Junction):
For Saturation EBJ and CBJ must be forward biased
For cutoff VBE < 0.5V.