A magnetron is a vacuum tube in which the flow of electrons is controlled by an applied magnetic field to generate electricity at microwave frequencies.