When X-rays interact with a material, they are scattered in various directions. The pattern of this scattering is influenced by the arrangement of atoms within the material. By measuring the angles and intensities of the scattered X-rays, a diffraction pattern can be obtained, which provides insights into the material's structure. There are different types of X-ray scattering techniques, including Small Angle X-ray Scattering (SAXS) and Wide Angle X-ray Scattering (WAXS), each suited for different scales of investigation.