Crystallization is a technique to separate solids from liquids. It is the process of formation of solid crystals from a homogeneous solution. For crystallization to occur the solution at hand ought to be supersaturated. Put simply, the solution should contain more solute molecules than it would under ordinary conditions. This can be achieved by various methods—solvent evaporation, cooling, chemical reaction, 'drowning' being the most common ones used in industrial practice.
To make things clear we can use a simple example. We take a bowl of water to which we add sugar crystals. We keep adding sugar to it until we reach a stage when no more crystals can be dissolved. This solution so obtained is a saturated one. It is interesting to note that we can dissolve more crystals to this particular saturated solution by heating it (since solubility of solutes increases with increase in temperature, although exceptional cases occur). This elevation in temperature causes more sugar crystals to dissolve in it (thus forming a supersaturated solution), but when the temperature of the solution is allowed to attain equilibrium with the surroundings, the solubility of the solute decreases (because the temperature of the solution has decreased) and the 'excess' sugar so added crystallizes out. This process essentially illustrates the simplest of supersaturation techniques. 'Drowning' is the addition of a nonsolvent in the solution that decreases the solubility of the solid. Alternatively, chemical reactions can also be used to decrease the solubility of the solid in the solvent, thus working towards supersaturation.
Crystallization can be divided into stages - primary nucleation is the first. It is the growth of a new crystal, which in turn causes secondary nucleation - the final stage (if removal of the crystals is not an issue). Secondary nucleation requires existing crystals to perpetuate crystal growth. In our sugar example, we had obtained such nuclei when the 'excess' sugar had just about crystallized out assisting further crystal formation. Secondary nucleation is the main stage in crystallization for this is what causes the 'mass production' of crystals.
Another common type of crystallographic defect is an impurity, meaning that the "wrong" type of atom is present in a crystal. For example, a perfect crystal of diamond would only contain carbon atoms, but a real crystal might perhaps contain a few boron atoms as well. These boron impurities change the diamond's color to slightly blue. Likewise, the only difference between ruby and sapphire is the type of impurities present in a corundum crystal.
In semiconductors, a special type of impurity, called a dopant, drastically changes the crystal's electrical properties. Semiconductor devices, such as transistors, are made possible largely by putting different semiconductor dopants into different places, in specific patterns.
Source: Wikipedia (All text is available under the terms of the Creative Commons Attribution-ShareAlike License)