There are two or more electrodes in an electron tube, and the electrodes are separated either by vacuum (in a vacuum tube) or by ionized gas at low pressure (in a gas tube). When it works, it generates and transfers electrons through the tube from one electrode to another.
The source of electrons is the cathode, which usually is a metallic electrode that releases a stream of electrons by one of several mechanisms. Once the electrons have been emitted, their movement is controlled by an electric field, a magnetic field, or both. An electric field is established by the application of a voltage between the electrodes in the tube, while a magnetic field may be produced outside the tube by an electromagnet or a permanent magnet.
To put it simply, an electron is attracted and accelerated by the positive electrode (a plate, or anode) and is rejected and slowed by the negative electrode (cathode). An electric field can convert the route of the electron stream, change the number of flowing electrons (alter the electric current), and modify their speed. The magnetic field serves primarily to control the movement of the electrons from one electrode to another.