How does a Magnetron Work?

A magnetron works by generating electrons in a heated cathode. The electrons are affected by magnetic and electric energy, and produces microwave radiation for use in microwave ovens and radar.