Crystallization is the (natural or artificial) process of formation of solid crystals precipitating from a solution, melt or more rarely deposited directly from a gas. Crystallization is also a chemical solid–liquid separation technique, in which mass transfer of a solute from the liquid solution to a pure solid crystalline phase occurs. In chemical engineering crystallization occurs in a crystallizer. Crystallization is therefore an aspect of precipitation, obtained through a variation of the solubility conditions of the solute in the solvent, as compared to precipitation due to chemical reaction.
The crystallization process consists of two major events, nucleation and crystal growth. Nucleation is the step where the solute molecules dispersed in the solvent start to gather into clusters, on the nanometer scale (elevating solute concentration in a small region), that become stable under the current operating conditions. These stable clusters constitute the nuclei. However, when the clusters are not stable, they redissolve. Therefore, the clusters need to reach a critical size in order to become stable nuclei. Such critical size is dictated by the operating conditions (temperature, supersaturation, etc.). It is at the stage of nucleation that the atoms arrange in a defined and periodic manner that defines the crystal structure — note that "crystal structure" is a special term that refers to the relative arrangement of the atoms, not the macroscopic properties of the crystal (size and shape), although those are a result of the internal crystal structure.