How do the electrons know which spots on the screen to color darker and which to leave lighter?
The electrons simply deliver energy (their own kinetic energy) to the phosphors they hit. When they are hit by electrons, these phosphors emit light. They fluoresce. The picture determines which spots on the screen should be dark and which ones should be light by controlling the number of electrons that hit those spots; by controlling the current in the beam. When the current hitting a spot is low, that spot glows dimly. When the current hitting a spot is high, that spot glows brightly.