A transistor is a semiconductor device that can act as a switch or amplifier by allowing or prohibiting current flow. It was invented in 1947 at Bell Labs by Bardeen, Brattain, and Shockley and revolutionized technology. Transistors are made of doped silicon and exist in NPN or PNP types, depending on if electrons or holes are the majority carriers. They have three terminals - emitter, base, and collector - and can be configured in common base, common emitter, or common collector modes, each with their own characteristics like input/output resistance and current/power gain.