What is the difference between a transistor used as a switch and an amplifier?

A transistor used as a switch is operated in saturated mode, where the ratio of base-emitter current over collector-emitter current is far more than hFe, or beta gain. The transistor is either fully on or fully off in this mode.

A transistor used as an amplifier is operated in linear mode, where the ratio of base-emitter current over collector-emitter current is equal to or less than hFe, or beta gain. The transistor is partially on in this mode, and is operating as a current controlled current sink.