When does a transistor act as a switch, and when as an amplifier?
Acting as a closed or open switch is just an extension of it acting as an amplifier at its limits. Imagine you use your weak little fingers to push some buttons to control a massive flood gate. Anything in between full closed and fully opened is throttling the flow of water somehow, but when fully open or fully close it's just acting as a switch to block or pass for the water.

When acting as an open (non-conducting) switch it is acting as an amplifier amplifying a signal of zero. When acting as a closed switch (conducting) it is acting as an amplifier trying to amplify the largest signal it can. It is amplifying so hard that it can't amplify any further. In the same way you can throw open the flood gates but that doesn't mean you can pass an infinite amount of water through the flood gates. The flow rate is is capped by the size of the flood gate. If more water wants to pass through the flood gate than in any single instant than the size of the flood gate will allow, it simply can't (you don't want this because it means the switch is the bottleneck which a good switch should not be). If the flow rate is less than the size of the flood gates, then flow is unrestricted by the flood gate and the flood gate is invisible to the flow (this is what you want).

Where's the amplification part? Don't forget that you couldn't possibly control all that water directly with just your little button pushing fingers.