A phase diagram links any two state variables, e.g. pressure and temperature, and shows regions in which a substance in equilibrium is in a uniform state, i.e. the local structure of all its atoms or molecules is identical. An amount of material in a uniform state is referred to as a phase: a glass of water with ice cubes in it contains water in its liquid and solid states, and the liquid and the ice cubes are one phase each.
The single-phase regions are separated by phase transition lines. At each point along such a line, the two phases are in equilibrium with each other - atoms/molecules can cross from one phase to the other, but it is a two-way process. Changing one state variable externally will force the other one to respond if equilibrium is maintained. At the triple point, solid, liquid and gas are all in equilibrium with each other, so any change of a state variable will mean that at least one of the phases disappears.
In order of increasing enthalpy, the states of matter are solid, liquid, gas and plasma. Solids and liquids are collectively referred to as condensed matter. These states are characterised by strong intermolecular forces, which maintain local order by keeping distances between individual molecules or atoms within close bounds. However, in a liquid, bond angles can fluctuate on a short time scale, allowing the liquid to flow and change its shape. Condensed phases are resistant to compression; their compressibility, i.e. the volume change per unit pressure change, is low compared to gases. In gases, on the other hand, intermolecular forces don't play an important role, and the distribution of gas molecules in a given volume is largely random. Finally, in a plasma, the enthalpy of the system is high enough to ionise individual atoms; the material consists of atom cores and free electrons.
Both solids and liquids are characterised by short-range order: the way the nearest neighbours are arranged around each atom (of the same type) is fairly uniform. The interatomic distances are governed either by Coulomb potentials (ionic compounds) or by pair potentials (covalent materials). A substance is liquid if the strength of the interatomic interactions is comparable to the thermal energy, $k_BT$. In this case, bonds can easily break and form again, resulting in a very flexible structure.
In a crystal the individual potentials are finely balanced, resulting in a periodic array of repeated local environments. Amorphous materials or glasses have a more liquid-like structure, except that bonds don't break and form dynamically. Short-range order is present in both types of solids, but only crystals have long-range order. The more disordered amorphous structure has a higher energy and is thus only metastable. To relax to the stable crystalline form, atoms would need to move across potential barriers and bonds may have to be broken. If the activation energy for such movements is large compared to the thermal energy, a glassy structure can be persistent.
It takes a long time and very stable conditions to grow large crystals. Crystal nucleation and crystal growth are competing processes. In good conditions, single crystals of ice (top left) can form in a couple of days. It takes very clean air (lack of nucleation sites) and constant cold weather (good growth conditions). At higher temperature and over geological timescales, this can result in the formation of impressive single crystals such as the massive selenite crystals in the cave at Naica in Mexico.
If nucleation dominates over growth because the crystallisation process is much faster, crystals grow from many separate nuclei. Individual grains touch, and a polycrystal with many grains of different orientation results, such as the lump of quartz shown bottom, left. Each individual grain is still a perfect crystal, but the long-range order stops at the grain boundaries.
The schematic shows one set of lattice planes in two adjacent grains of a polycrystalline material. Because the grains are orientated differently and atoms are equally spaced on each lattice plane, the atoms along the grain boundary will not usually fit in both periodic patterns at the same time. As a result, atom positions along the grain boundary become more disordered, which in turn can affect physical properties such as conductivity and thermal expansion.
Next, we'll see how to describe a crystalline structure in terms of its periodicity and the smallest repeat unit.