How does a transistor amplify current or voltage?

""A relay can be compared to a vacuum tube and solid state transistor amplifier because both can use a small voltage and current in one circuit to control a large voltage and current in another circuit. However, unlike tubes and transistors, a relay cannot produce a variable output; It can only switch on and off similar to a logic circuit in a computer. But the relay has the advantage of being able to completely isolate its input circuit from its output.""