Crystals are solids that consist of atoms arranged in a regular and repeated pattern, occupying its original shape. Almost all crystals are of similar shape, except a few. Salt crystals comprising of sodium chloride are cube shaped. Diamonds and graphite comprising of pure carbon are also crystals. These crystals are formed by aggregation of solute molecules in the liquid. Their formation process is initiated like this:
In a solution, the water or solvent molecules are added with solute molecules. As the solute molecules are added continuously the solvent molecules keep accommodating them in the solution. If the solution is cool, then a few of the solute molecules are accommodated. If the solution temperature is high, then more solvent molecules give room for more solute molecules to enter into the solution. By nature, every solute molecule has an attractive force surrounding it. It tends to drag another solute molecule towards it, but the solute molecules are prevented from existing together by other strong forces. In a saturated solution where the solute content is far more than solvent molecules, solute molecules attract each other and form either small or large crystals. This is called re-crystallization.
This formation of crystals is through a process called nucleation. Nucleation is of two types, assisted and unassisted nucleation. In this process, an initial seed to form a crystal exists in the solution. If the seed crystal is an external object, and not part of the solution, then it is called assisted nucleation. If the seed is created by the solute molecules in the solution itself, then it is called unassisted nucleation.
If the crystallization occurs fast, then small crystals result. If it is slow, then large crystals result. The rate of crystallization will determine on the crystal’s quality. In unassisted nucleation, a solute molecule attracts another, and the two attracts another and they gradually form a group. This adsorption of solute molecules on the seed goes on until equilibrium is reached between the crystal solute quantities and the solution. In this way the crystal grows.
The formation of crystals will be the same way, even inside the rocks, from the molten lava and so on. Crystals are formed due to an increase in attractive forces between the solute molecules in a saturated solution.