A vacuum tube is a type of diode containing two metal electrodes in a glass bulb from which the air has been evacuated. The electrodes are called the anode and cathode. The cathode is negatively charged and the cathode is negatively charged and consists of a filament which can be heated by passing a current through it like the filament of an electric lamp.
When the diode is connected to a voltage, no current may flow. The electrons do not have enough energy to escape from the anode. When a current is passed through the anode so that it becomes hot, the electrons gain enough energy to escape the anode. This process is called thermionic emission. If a voltage is applied across the diode so that the filament is negative then electrons are attracted to the positive plate and a current flows. No current may flow in the other direction, so the diode only allows current to flow in one direction.