In situ XRD involves directing X-rays at a sample and measuring the diffraction pattern that results as the X-rays are scattered by the atomic planes within the material. By performing these measurements under different conditions—such as varying temperature, pressure, or chemical environment—one can observe how the structure of the material changes in real-time.