A magnet deflects the electrons into the glass wall causing it to glow. As the pressure drops and the orange glow of the nitrogen begins to fade, move a magnet underneath the electron beam. The beam will bend to the side, collide with the glass wall of the tube, and cause the glass to glow blue. Electrons are accelerated by the 15,000 volt difference between the metal electrodes at the ends of the tube. When the electrons collide with molecules in the tube, mostly nitrogen, those molecules are excited and then when they drop back to lower energy states the molecules emit light.
Nitrogen emits a pale orange light.
When the electrons collide with the glass, impurities in the glass cause it to fluoresce blue. Moving electrons are bent to the side by magnetic fields. This side ward force is called the Lorentz force. See the math root below for more details. I've never heard a good explanation for why there are glowing bands separated by dark regions.