With a VGA signal, a pulse on the vsync line tells the monitor to start at the top left. A pulse on the hsync line tells the monitor to move down a row. In between those pulses, the analog values of the RGB values determine the color as the beam scans left to right. The CRT is dumb -- it's up to the device sending the signal to time the pixel values correctly so they hit the screen as the beam scans over the correct spot on the screen. If you were making a device that needed to display analog video, you'd have to make sure the signal you were outputting would make the electron gun fire at the right time. (e.g.: http://www.tinyvga.com/vga-timing)
> How does it move so fast?
They're electromagnets, so they move in sync with the timed signal sent to them.
Here's a video demonstrating how to do a full setup (calibration) on a vintage color CRT (timestamp 16:02 for the start of the procedure): https://youtu.be/Oeylkj1vap8?t=962
CRTs are yet another circuit component. They rely on electrons moving or getting stored in them to "work". If you increase the voltage, the electrons will move faster through the gun and crash into the phosphor coating with more kinetic energy. Or one can increase the current i.e. the number of electrons hitting the CRT per unit of time. Both results in a brighter spot. Both requires one to increase voltage of some circuit at some point of the upstream.
Since the TV signals are also an observable piece of voltage information, which we receive via an antenna, we can create circuits that are capable of detecting that voltage and simply act on its strength. We can create a circuit that acts when a higher voltage level is observed and cause the dot to be brighter.
We can create a circuit that has repetitive behvaior like changing the magnetic field in the deflection coils such that it periodically moves left to right. So it will draw a line.
We can also create circuits that act on time-dependent behavior like the voltage dipping down for a tiny fraction of a second to a level that cannot produce a dot. So we can detect when we should move the deflection coil's magnetic field slightly downwards to draw the next line. Or even bigger dip to reset the position all the way to top.
When you combine all those circuits into one big Rube-Goldberg machine and adjust the thousands of literal and figurative knobs, you'll get a TV.