How does a transistors acts as a switch?

by saturating the junctions it becomes a low resistance current path from a relatively hi impedance.