Because crystals tend to be pure and have molecules in a well-defined geometric, repeating pattern, they are useful for inferring structure at the molecular level.
To perform X-ray crystallography, one must first grow crystals of the biomolecule of interest. There exist various protocols for crystal formation. Generally, liquid solutions containing different concentrations of biomolecule and different concentrations of salts and/or additives are created and then (after an appropriate amount of time) observed to see if any crystals have grown.
The resulting crystals are taken to a facility that can create powerful X-rays (such as a synchrotron). Each crystal is exposed to X-rays at many angles, creating X-ray diffraction patterns (which appear as patterns of dots). At the molecular level, the X-rays are bouncing off of any atoms that they hit; because the crystal has a repeating pattern of molecules, this results in a pattern being formed by the diffracted X-rays. Computer algorithms can look at X-ray diffraction patterns and infer the 3D structure of the molecules making up the crystals.
Crystals can sometimes be difficult to grow, depending on the exact biomolecule being studied. The properties of the biomolecule will influence crystal growth conditions; for example, as a rule of thumb membrane proteins have to be crystallized differently than non-membrane proteins.
X-ray crystallography requires access to facilities such as synchrotrons.