Flux lines are not a real thing, they are a mathematical simplification of the interactions between photons and charges that are fully explained by quantum electrodynamics.
Now, to answer your questions:
How do they know that? By observation.
Do the flux lines grow instantaneously? No, the effects of turning on a current in a wire will propagate outwards at the speed of light, not instantaneously.
Bob