Production of X-rays
Like radio waves, microwaves, infrared, ultraviolet and light rays, X-rays are classified as a form of electromagnetic radiation. It travels at the speed of light and its energy is proportional to wavelength.
This energy containment is described by the equation: $E = h\nu$. The term h is a constant of proportionality, in this case also known as Planck's Constant. If you don't know much about quantum physics, some knowledge won't cause you to swell and explode, nor will you feel any pressure in your head. The book E=mc2 by David Bodanis is a very useful read.
The X-ray Tube
The components of the Xray tube include a glass envelope containing a high vacuum.
A cathode or negative electrode which contains a tungsten filament, which when heated emits electrons in a process called 'thermionic emission'. The cathode also has a focusing cup to better direct the emitted electrons across the vacuum to hit the target. The anode or positive electrode is a thick copper rod with a small tungsten target at the end. Tungsten is required as it has a high atomic number to improve the efficiency of bremsstrahlung x-ray production, and a high melting point. There is a good deal of heat generated and hence the need for high melting points, AND the copper anode to conduct heat away effectively. Some machines have an oil based cooling system ported through the anode, while others have a spinning electrode to effectively increase the surface area. Either way, considerable heat needs to be dissipated. A potential difference, or voltage is applied between the cathode and anode. The cathodic tungsten filament is heated by an independent current and the thermionically emitted electrons are accelerated across the potential difference to a high velocity before striking the tungsten target. The high vacuum is needed to reduce the electron/atom collisions which waste accelerating energy. The electrons that hit the tungsten target undergo sudden deflection because of the interactions with the tungsten nucleus. The tungsten target is usually angled to direct the resultant Xrays towards a consistent portion or window in the tube wall.
Some additions to this basic set up include the anode hood made of copper and tungsten that act like blinkers to prevent stray electrons from striking the walls of the tube. The copper catches the electrons and the tungsten attenuated the photons produced in the copper. The window is thin and made of beryllium. Beryllium is chosen because it is a metal which has little effect on the photon beam (it has a low Z), and can effectively maintain the vacuum.