Particle accelerators are used in medicine, research and industry for a variety of applications. Some can even be used for homeland security in detecting smuggled nuclear materials or for sterilizing medical instruments. The very microwave ovens found in our kitchens use a very simplified version of the high wattage accelerators such as those found in many radiation treatments utilized for cancer. Our microwave ovens however, are not used to accelerate free electrons in air but they are rather used to jiggle electrons on molecules in an item (such as food) intended to be heated. When accelerators are used in medicine, they are often used for either radiation therapy treatments for cancer or to create special radioisotopes to be used in nuclear medicine. Scientists also use accelerators to explore the nucleus of atoms and to discover new subatomic particles.
When a charged particle passes through a magnetic field at a right angle, the force generated on that charged particle is fairly simple to calculate. Similarly when a charged particle is placed into an electric field, the electric field will create a force on that charged particle. This effect can be used to accelerate a charged particle such as an electron. A microwave is an electromagnetic wave, just like visible light, x-rays and gamma rays. The only difference between all of these forms of electromagnetic radiation are the energy of each. In fact, microwaves have less energy than infrared photons which have less energy than visible light which has less energy than ultraviolet light which has less energy than x-rays which have less energy that gamma rays on a per photon basis. Less energy in a photon is equivalent to having both a longer wavelength and a lower frequency. In each of these forms of electromagnetic radiation, the photon is an oscillating electric and magnetic field. These swing back and forth at right angles to each other, the electric field in a photon is always at right angles to the magnetic field.
All accelerators take advantage of this basic principle to get charged particles moving extremely fast. Just like your microwave at home, a standing wave can be created in a conducting tube or duct. A standing wave in terms of electromagnetic radiation is like a jump rope in that although it does oscillate up and down and back and forth, its nodes (where the ends are held) and maximum and minimum positions do not travel to the left or right, they stand in the same place continually. A special device called a waveguide can be constructed so that when a standing microwave is created, an electron will move from one chamber to the next just as the field is oscillating so that the field is continually pushing the electron harder and harder as it travels through successive regions of that standing wave.
The acceleration of electrons can be used to generate x-rays or as a radiation source in and of themselves. X-rays can be created by pummeling the accelerated electrons into a heat resistant metal such as tungsten so that the rapid deceleration of the electrons create what is called Bremstrahlung radiation. This is basically a conversion of the kinetic energy of the electrons into photon energy in the x-ray energy range. Some additional x-rays are created by exciting the orbital electrons in the target material to higher energy orbitals such that when they relax into lower energy levels, the energy difference is given off as photons having energy in the x-ray range.