A vacuum tube is an evacuated glass envelope with metal electrodes inside. The filament glows red-hot and heats the cathode so strongly that electrons boil off its surface - thermionic emission, the same trick used inside a CRT or an X-ray tube.
Electrode stack and amplification in a triodeBetween the cathode and the anode (plate) sits the grid, a fine wire mesh. A tiny negative voltage on the grid repels some electrons and cuts the plate current; a tiny positive voltage lets it surge. A weak signal on the grid therefore controls a much stronger current to the plate - amplification.
ENIAC (1945) packed about 18,000 vacuum tubes that burned out constantly, generating enormous heat. Their bulk, cost and unreliability are exactly why the transistor, and later the integrated circuit, replaced them.