When x-ray waves interact, they sum together to create either amplified waves (constructive interference) or suppressed waves (destructive interference).
The interference type depends on the phase of the x-rays (i.e., if the wave peaks are in or out of phase with each other).
When an x-ray wave interacts with individual atoms, it can be absorbed by the electrons and cause the electrons to oscillate (wiggle). This oscillation acts as a new emission source and emits an x-ray of the same energy as the incident x-ray. This is known as Thomson scattering.
All of the individual sources of scatter will subsequently constructively and destructively interfere with each other, creating a diffraction pattern.