A bipolar junction transistor (BJT) is a three pin electrical part used to turn a small current into a much larger current. A transistor has three pins: base, emitter, and collector. A small current into the base creates a large current into the collector. Even regular transistors can amplify current 50 or 100 times.
Transistors are made from semiconductors, just like LEDs and other diodes. But instead of one N type and one P type semiconductor, transistors are a semiconductor sandwich. NPN transistors are two N types with a P type in the middle, and PNP are the opposite.
If you power the collector but not the base, no current will flow through a transistor. But by sending a small amount of current from the base to the emitter, a much larger current from the collector to the emitter can flow. A small base current removes the "obstacles" inside the semiconductor, allowing a much larger collector current to flow.
Transistors are useful when you want to turn a small signal into a large signal. In the above circuit, a large resistor feeds a small current into the base of an NPN transistor. The transistor multiplies this current into the collector. This collector current is enough to light up the LED. Transistors are useful when you need to amplify a small signal from a sensor or send power to speakers or motors.