{ For a physicist there's probably quite a lot of simplification, this is written from the limited point of view of a programmer. ~drummyfish }
Semiconductors are materials whose electrical conductivity varies greatly with conditions such as temperature, illumination or their purity, unlike insulators who generally don't conduct electricity very well (have a great resistivity) and conductors who do. Semiconductors, especially silicon (Si), are the key component of digital electronic computers and integrated circuits. Other semiconductors include germanium, selenium or compound ones (composed of multiple elements).
Semiconductors are important for computers because they help implement the binary logic circuits, they can behave like a switch that is either on (1) or off (0). Besides that they can serve e.g. for making measurements (a component whose resistivity depends on its illumination can be used to measure amount of light by measuring the resistivity). Especially important electronic components based on semiconductors are the diode (lets current flow only one way) and transistor (a purely electrical "switch" that can be made extremely tiny).
Normally semiconductors don't conduct so well at room temperature (they conduct better at higher temperatures, unlike metals), but their conductivity can be increased by so called doping -- introducing small impurities of other elements. By doing this we can get two types of semiconductors:
If we connect a P and N type semiconductors, we get so called PN junction which only conducts current one way and is used in diodes and transistors. After putting P and N materials together, at the boundary some electrons from the N type material fill the holes in the P type material which creates a small depletion region of certain width. This region is an electric field that's negative on the P side and positive on the N side (because negative electrons have moved from N to P). If we connect the PN junction to a voltage source, with P side to the positive and N side to the negative terminal, we create an opposite electric field which will eliminate the depletion region and allow the flow of current. Connecting the sides the other way around will result in increasing the width of the depletion region and blocking the current flow.
All content available under CC0 1.0 (public domain). Send comments and corrections to drummyfish at disroot dot org.