How can the magnets be manipulated in such a way that they can do this moving of the electron beam in such an incredibly small amount of time?
The electromagnets that control the beam are able to turn on and off very quickly. The only limit on the rate at which they can change the magnetic field comes from their inductance. They do resist changes in current passing through them. Fortunately, the television doesn’t move the beam about randomly; it sweeps the beam smoothly. Thus the changes in the current through the electromagnetic coils are also smooth. The television has no trouble ramping the field through the horizontal sweep coils back and forth every 1/15,750th of a second.