How can transistors act as amplifiers?

the magical computer fairies wave there magic wands and make electricity appear sometimes they live in transistors as this is where theyare happiest and that happiness is turned into electricity