Intel Corporation interview question

How does x-ray diffraction work? This was an easy question, but unexpected.