How a transistor acts as an amplifier?

A transistor does not act as an amplifier. It is used as a component in an amplifier circuit.