Like dragging your finger through sand, moving charged particles disturbs to the electromagnetic field. When you make the particle accelerate, the disturbance becomes a propagating EM wave. The bremstrahlung machine (syncrotron) makes the electrons move in a circle which means it is constant centrifugal acceleration. By tuning the power and radius of the machine, you can make the EM waves have photons in the x-ray band.
>Synchrotron radiation (also known as magnetobremsstrahlung radiation)>https://en.wikipedia.org/wiki/Synchrotron_radiation