First and most important, all materials used must be of very high purity. Electronics-grade silicon can have no more than 1 part per billion of impurities. Silicon meant for low-efficiency polycrystalline solar panels can be less pure, though still at least 99% (with more 'nines' better).
Second, the material has to be made into a useful form. Several important types (particularly silicon and germanium) are monocrystalline, meaning a single large crystal is cut into slices (wafers) and further processed. A few can be polycrystalline slices which are processed similarly to monocrystalline wafers. Other types are thin film, meaning a thin layer of the semiconductor is grown on top of some other material.
Third, useful semiconductors are formed when very small amounts of the base material are replaced by other materials (dopants). In general other elements are added to change the electrical properties of the base, but some dopants are used to make the base stronger or alter its crystalline structure.
Details after the jump.
(part 2) (part 3) (part 4)
The most common semiconductor today is silicon, but other group 14 (or group IV if you prefer) elements can be semiconductors as well. Germanium and tin are common. To be useful, members of this group are doped with either group 13 (III) elements or group 15 (V) elements. Other interesting semiconductors are compounds of a group 13 element like gallium and a group 15 element like arsenic; these are referred to as III-V semiconductors. There are examples outside these two groups, such as lead sulfide or copper oxide, plus more complex compounds like copper-indium-gallium-selenide or CIGS.
Also of concern, the metals used to make electrical connections need to be pure enough that contaminants cannot migrate from the wires into the semiconductor. Copper diffuses like this and affects the electrical properties of other semiconductors, so when copper is used a barrier metal is placed between it and the semiconductor.
First step, purification. In nearly all cases these high-purity processes are complex, difficult and consume either large amounts of energy or difficult-to-obtain chemicals. It is important to get the purity as high as feasible from whatever mining process is being used, preferably 99% or better.
The chemist's family of methods for silicon is to dissolve in acid (producing silane or trichlorosilane), distill the volatile gas, then expose the purified gas to pure silicon or heat it until it decomposes. This causes the silane to break down, depositing pure Si and releasing hydrogen and/or hydrogen chloride gas. In one of the two commercial processes (Siemens), the trichlorosilane is used directly while in the other process (Union Carbide) a disproportionation step is performed to yield pure silane. An alternative method uses alcoxysilane and requires no chlorine but is otherwise similar to the Union Carbide process (multiple intermediate molecules plus disproportionating step).
Similar processing can be used with any material that volatilizes; usually these will be hydrides, chlorides or fluorides but sometimes there are exploitable quirks of chemistry available. For example, iron and nickel can be reacted with carbon monoxide to form carbonyl, distilled, then deposited at moderately high temperatures and very high purity.
The engineer's method is zone refining, often called float zone melting. A thin section of a bar of material is melted, then the melt is moved along the length of the bar. Impurities concentrate at either end, mostly the last-melted end for silicon. This occurs because contaminants are basically forming an alloy with silicon, which changes the melting point slightly. This difference in melting point causes most non-silicon atoms to stay dissolved in the melt. The ends of the bar are cut and reprocessed, while the middle section is the refined product. On Earth the bar is vertical to take advantage of gravity, but it is possible to use just a temperature gradient in microgravity. Many passes are required, typically at least 20. This is sometimes used as a 'polishing' step for high-purity silicon from a chemical process.
The physicist's method, a sort of last resort option, is the calutron. The material to be purified is ionized and accelerated as a particle beam, then fired through a powerful magnetic field. Each particle is affected according to its mass, allowing elements and even individual isotopes to be separated to absurdly high purity. The process is energy-intensive and very low throughput but can be used to purify virtually any element. One example might be to separate isotopes of potassium if for some reason you needed a nonradioactive supply with no 40K.
Next step, forming. The two basic options are wafers or thin films.
Thin films are usually deposited by passing a gas over the substrate at high temperature, where the gas decomposes and deposits the desired material. A good example is plating sheets of glass with silicon by flowing silane gas in a reduced-pressure chamber. Another example is flowing hydrogen and methane, where the methane breaks down and deposits carbon on the surface as thin-film diamond or diamond-like carbon. Mixed gases can be used or several passes can be made to make the desired layers. The term for this is chemical vapor deposition or CVD. In most cases this requires a few hundred °C so the most common substrates are glass, steel and semiconductor wafers. When done properly, this method produces very even films across the whole substrate.
A second option is to vaporize the film material into a gas or plasma, spraying the substrate with individual atoms or very fine droplets of film. (PVD or physical vapor deposition.) This is more energy intensive and can be difficult to make very even films, but it can be used at low temperatures on substrates that can't handle the heat of CVD and can be used to deposit materials with no convenient gaseous compounds. We use enormous amounts of PVD material every day; the shiny metallic layer in food packaging is aluminized mylar which is produced by this method.
Both methods usually require good vacuum equipment, though CVD is less demanding. In space we have access to an abundance of hard vacuum. The trouble is capturing all of the chemicals involved; every gram counts, so we cannot waste any reagents. There are some possible approaches, but it is safer to assume that we must use current equipment. There are other processing steps later in the chain that may be able to use the natural vacuum environment.
Wafers are thin slices (about 0.75 mm) cut from bars or other shapes. Polycrystalline silicon, for example, can be melted and cast into bars, billets or ingots and then sawn into slices. Monocrystalline wafers require an additional process to make large single crystals. The most common is the Czochralski process, where a charge of silicon is melted, then a rod with a seed crystal is touched to the surface. The rod and the melt are spun in opposite directions and the rod is gradually drawn up. This produces a single crystal with the same orientation as the seed crystal, typically 300mm diameter and up to 2m length, though smaller dimensions are easier to accomplish.
Wafer slicing is done either one slice at a time with an inner-diameter saw (a disk with a center hole and the cutting edge on the inside) using diamond particles embedded in nickel or composite, or a whole ingot all at once with a wire saw (a web of wire on high-speed drums) with a cutting slurry applied. In either case the cut wafers must be rigorously cleaned, edges beveled to prevent chipping, surfaces polished to remove surface roughness from sawing, then passivated with oxygen or nitrogen to form a very thin oxide or nitride layer that protects the wafer against contamination. Cutting and polishing removes about 0.2 to 0.3 mm of material, so the yield of wafers is roughly one per mm of ingot (a thousand per meter). These machines have to be very precise and tend to be large and heavy in order to minimize vibration and loss of alignment.
The reason semiconductors must be so very pure is that they exist in a close electrical balance. I doubt I can improve on Wikipedia's explanation, so I will quote that section here:
Usually the bulk material is made either n-type or p-type and structures are built on top of that with the opposite type. This can be done by several methods:The conductivity of semiconductors may easily be modified by introducing impurities into their crystal lattice. The process of adding controlled impurities to a semiconductor is known as doping. The amount of impurity, or dopant, added to an intrinsic (pure) semiconductor varies its level of conductivity. Doped semiconductors are referred to as extrinsic. By adding impurity to the pure semiconductors, the electrical conductivity may be varied by factors of thousands or millions.A 1 cm3 specimen of a metal or semiconductor has of the order of 1022 atoms. In a metal, every atom donates at least one free electron for conduction, thus 1 cm3 of metal contains on the order of 1022 free electrons, whereas a 1 cm3 sample of pure germanium at 20 °C contains about 4.2×1022 atoms, but only 2.5×1013 free electrons and 2.5×1013 holes. The addition of 0.001% of arsenic (an impurity) donates an extra 1017 free electrons in the same volume and the electrical conductivity is increased by a factor of 10,000.The materials chosen as suitable dopants depend on the atomic properties of both the dopant and the material to be doped. In general, dopants that produce the desired controlled changes are classified as either electron acceptors or donors. Semiconductors doped with donor impurities are called n-type, while those doped with acceptor impurities are known as p-type. The n and p type designations indicate which charge carrier acts as the material's majority carrier. The opposite carrier is called the minority carrier, which exists due to thermal excitation at a much lower concentration compared to the majority carrier.For example, the pure semiconductor silicon has four valence electrons which bond each silicon atom to its neighbors. In silicon, the most common dopants are group III and group V elements. Group III elements all contain three valence electrons, causing them to function as acceptors when used to dope silicon. When an acceptor atom replaces a silicon atom in the crystal, a vacant state ( an electron "hole") is created, which can move around the lattice and functions as a charge carrier. Group V elements have five valence electrons, which allows them to act as a donor; substitution of these atoms for silicon creates an extra free electron. Therefore, a silicon crystal doped with boron creates a p-type semiconductor whereas one doped with phosphorus results in an n-type material.
Using a zone melting furnace a thin layer of dopant can be melted through a bar of semiconductor to produce a precise degree of impurity. Sometimes this is done to make 'reference' pellets that can be added in specific proportions to pure material to get a specific amount of dopant in a melt so the material only has to be melted once in the drawing crucible.
Using CVD or PVD techniques, the dopant can be introduced to the surface of the semiconductor, then the material is heated and the impurities diffuse into the crystal structure. This is an efficient approach if only a thin layer needs to be doped, and is often used along with masking to make small doped features on the surface of a wafer.
Using an ion beam, the dopant atoms can be fired directly into the crystal structure. This is perhaps the most common method in microprocessor manufacturing as it is extremely precise; the beam can implant any desired quantity of ions at controllable depth and in very small spot sizes. This process causes crystal defects, so the wafer generally has to be annealed (heated, then cooled slowly) to allow these defects to heal.