Thermionic emission
Thermionic emission is the emission of electrons from a heated metal (cathode). This principle was first used in the Coolidge tube and then later in the modern day x-ray tubes. Before the discovery of the principle, gas tubes were used for x-ray production.
The cathode has its filament circuit that supplies it with necessary filament current to heat it up. As the temperature increases, the surface electrons gain energy. The energy acquired by the surface electrons allows them to move a short distance off the surface thus resulting in emission.
A pure tungsten filament must be heated to a temperature of 2200°C to emit a useful number of electrons.
The electrons emitted from the surface are limited by the space charge effect.