X-rays were discovered in 1895 by Wilhelm Röntgen while experimenting with cathode ray tubes. X-rays are produced when high-speed electrons interact with matter, such as the tungsten target inside an X-ray tube. Tungsten is used as the target material because it has a high atomic number and melting point and can withstand the heat produced. Modern X-ray tubes use techniques such as rotating anodes and water cooling to dissipate heat. X-rays are used in medical imaging and radiation therapy by generating them using X-ray tubes powered by high voltage electrical circuits.