Applying a high electric current to the x-ray tube's Cathode (filament) creates thermionic emission (ionization of electrons by thermal energy) and is used to create a source of free electrons (e-) that will be accelerated across the x-ray tube.
Once thermionic emission is achieved, tha application of a high Voltage to that Cathode will accelerate the free electrons (e-) toward the x-ray tube's anode (an extremely dense metal).
During interactions with the Anode's matter (i.e., atoms), the fast moving electrons (e-) decelerate and convert their kinetic energies (energy of motion) to electromagnetic radiation EM (radiant energy - x-rays).