A transistor is a three-terminal semiconductor device where a small electrical quantity applied between two terminals controls a much larger current flowing between two others. A weak input steering a strong output is the whole reason transistors exist and the prerequisite for amplification.
A Diode is a one-port device: once you know the voltage across it you know the current through it, and that’s the whole device. There’s no way to make a diode’s current depend on a separate input. A transistor breaks that limitation. With three terminals, one terminal (or the voltage/current at it) acts as a control knob on the current between the other two. A tiny input wiggle produces a large output wiggle, and the ratio of the two is gain.
The third terminal lets one part of a circuit control current in another, the prerequisite for amplification or switching.
Why a controlled current source does so much
If a transistor can make its output current track an input voltage, then feeding that current into a resistor turns it back into a voltage, and if the ratio is chosen well, a much bigger voltage. That’s a voltage amplifier. The same controllability builds oscillators, mixers, current sources, and every active signal-processing block. Without a three-terminal controlled device you can’t make energy from a power supply do useful work on a weak signal.
The same device used differently is a switch. Drive the control terminal hard one way and the output conducts fully (a closed switch); drive it the other way and the output is off (an open switch). That binary behaviour is the basis of all digital logic: every logic gate, memory cell, and processor is built from transistors used as switches.
Two families
The two families here are the BJT (bipolar junction transistor) and the field-effect transistor, whose dominant member is the MOSFET. They reach the same end (a controlled current) by different physics. In a BJT a small base current controls a large collector current; charge carriers of both polarities (electrons and holes) take part, which is what “bipolar” means. In a FET a gate voltage sets up an electric field that controls a channel; only one carrier type conducts. MOSFETs dominate modern electronics, especially digital logic, because they are tiny, draw no steady control current, and pack by the billions onto a chip. BJTs survive in analogue niches where their higher transconductance and device matching matter.
Other families exist (JFETs, MESFETs, HEMTs, IGBTs) but the BJT and MOSFET cover almost everything you need here.