Most elements emit x-rays when properly bombarded with electrons.
All of the energy from the electrons' impact then goes into heating the tungsten. Tungsten is used because it can withstand this bombardment, as it has a high melting point and can conduct heat away very well. The bremsstrahlung pattern looks very similar no matter what element you use. The K-shell emission spectrum is unique and different for each element. The incoming electron is accelerated and strikes the tungsten at a high speed and has a lot of energy.