Crystallization is a method of purifying a solid. There are two types of impurities: those more soluble in a given solvent than the main component and those less soluble. The crystallization process itself helps in the purification because as the crystals form, they select the correct molecules, which fit into the crystal lattice and ignore the wrong molecules. The solubility of the compound in the solvent used for crystallization is important. This is of course not a perfect process, but it does increase the purity of the final product.
This video explains how to prepare the crystals of (a) Copper sulphate, (b) Potash alum and (c) Benzoic form their impure samples through crystallisation.