How does a transistor amplify current or voltage?

The section of the webpage you referred to that you might want to look more closely at is the one that discusses this:

Saturation – The transistor acts like a short circuit. Current freely flows from collector to emitter.

Cut-off – The transistor acts like an open circuit. No current flows from collector to emitter.

Active – The current from collector to emitter is proportional to the current flowing into the base.

Reverse-Active – Like active mode, the current is proportional to the base current, but it flows in reverse. Current flows from emitter to collector (not, exactly, the purpose transistors were designed for).

Nearly all the examples we deal with here in Arduino-land reside in the digital realm where the transistors "active amplification mode" is mostly irrelevant because we are using it in "saturation" mode. This is why we see so few good "analog amplification" examples in our little Arduino world. We are using them as switches where they behave in essentially a full-on or full-off switch mode to do things like drive a relay.

You also seldom see just a "single" transistor analog amplifier because with just one transistor you don't get a lot of "result" if you are aiming for some serious punch. The issue is that you have to fight with the parameters to keep the transistor operating in the Active region by employing careful use of signal biasing (often just a set of resistors) and signal coupling (usually done with capacitors) in a bipolar signal scenario... like your home stereo. High power BJT's usually have low gain and high base current requirements. This is often a killer to a small signal needing to be amplified so, as a result, multiple, carefully designed amplification stages of transistors are used to ultimately achieve the desired signal. (Driving a speaker, for example)

By utilizing the transistors ability to take a small signal at the base pin and create a proportionally larger "result" from it, you get the amplification result that was not obvious to you. This is something you DON'T get from a transistor when it is used as a switch. With amplification, you have to keep it OUT of saturation mode.