The transistor, invented by three scientists at the Bell Laboratories in 1947, rapidly replaced the vacuum tube as an electronic signal regulator. A transistor regulates current or voltage flow and acts as a switch or gate for electronic signals. A transistor consists of three layers of a semiconductor material, each capable of carrying a current. A semiconductor is a material such as germanium and silicon that conducts electricity in a "semi-enthusiastic" way. It's somewhere between a real conductor such as copper and an insulator (like the plastic wrapped around wires).
The semiconductor material is given special properties by a chemical process called doping. The doping results in a material that either adds extra electrons to the material (which is then called N-type for the extra negative charge carriers) or creates "holes" in the material's crystal structure (which is then called P-type because it results in more positive charge carriers). The transistor's three-layer structure contains an N-type semiconductor layer sandwiched between P-type layers (a PNP configuration) or a P-type layer between N-type layers (an NPN configuration).
A small change in the current or voltage at the inner semiconductor layer (which acts as the control electrode) produces a large, rapid change in the current passing through the entire component. The component can thus act as a switch, opening and closing an electronic gate many times per second. Today's computers use circuitry made with complementary metal oxide semiconductor (CMOS) technology. CMOS uses two complementary transistors per gate (one with N-type material; the other with P-type material). When one transistor is maintaining a logic state, it requires almost no power.