Function of an Electron Gun

The heater voltage Vheat causes a current flow via the filament. This current heats the filament and because of the thermionic emission (thermal electron emission) electrons get out of the metal. So an electron cloud is set up around the hot cathode.
The acceleration voltage Vb generates an electric field between the hot cathode and the anode. This field accelerates the free electrons from the hot cathode to the anode.
After passing the anode the electrons move forward with constant speed in a straight direction. Everything happens in an evacuated glass bulb, so that the electrons does not clash with air molecules.
Anode E-Feld