X-ray crystallography is a technique used for determining the atomic and molecular structure of a crystal. By measuring the angles and intensities of X-rays that are diffracted by the crystal, a crystallographer can produce a three-dimensional picture of the density of electrons within the crystal. This method is crucial for understanding the structure of various biological molecules.