Conductors and insulators
Electric current is moving charge. In copper, a conductor, about one electron per atom is free to roam, so current flows easily. In glass, an insulator, every electron is held tight, so almost nothing flows.
Silicon
Silicon is a semiconductor: it conducts far better than glass but far worse than copper. Its big trick is that we can tune how well it conducts. Here is a tiny patch of a silicon crystal.
A silicon atom has 14 electrons, but only the 4 in its outer shell take part in bonding. These are its valence electrons. Each one pairs up with an electron from a neighbouring atom.
Every atom shares its 4 valence electrons with 4 neighbours, so every bond holds a pair. The atoms line up in a neat repeating pattern called a crystal, and all the electrons are locked into bonds.
Close the switch: the battery pushes, but almost nothing moves. At room temperature only about 1 atom in 5 trillion shakes an electron loose. In this small patch none has, so the bulb stays dark.
Doping
Now swap a few silicon atoms for phosphorus. Phosphorus has 5 valence electrons. Four fill the bonds; the fifth has no bond to join and is only weakly held, so at room temperature it breaks free.
Close the switch. The free electrons drift toward the + side, round through the wires and the bulb, and back in at the - side. Silicon doped this way is n-type: n for negative, the charge of its carriers.
Start again and use boron instead. Boron has only 3 valence electrons, so one of its 4 bonds is one electron short. That empty spot is called a hole.
Close the switch. A neighbouring electron hops into the hole, leaving a new hole behind it. Hop by hop, the hole drifts toward the - side, as if it were a positive charge. This is p-type silicon.
Real doping is far sparser than this drawing: often about 1 dopant atom per 5 million silicon atoms, under one part per million. Yet that gives about a million times more free carriers than pure silicon.
In detail
;; step 1/10 · materials Resistivity (how strongly a material resists current), room temperature: copper 1.7 × 10^-8 Ω·m conductor glass 10^9 to 10^13 Ω·m insulator pure Si 3.2 × 10^3 Ω·m in between Copper: one free electron per atom (HyperPhysics).
The board is a teaching model: the battery, the switch and the bulb show the idea. Doped silicon conducts well enough to light a small bulb; pure silicon does not. The flat square grid is the usual simplified sketch. Real silicon is a 3D diamond lattice; every atom still bonds to four neighbours. The drawing has 2 dopant atoms in 15 sites so you can see them. A typical real level, 1 × 10^16 per cm³, is 1 dopant per 5 million silicon atoms (0.2 ppm). Silicon numbers at 300 K (Ioffe Institute): 5 × 10^22 atoms per cm³, 1 × 10^10 free electrons per cm³ in pure silicon, resistivity 3.2 × 10^5 Ω·cm, 0.045 eV to free the extra electron of phosphorus or fill the hole of boron.