Sun dogs are an optical effect; an illusion. If one were to fly toward it, one would never reach it. Sun dogs appear to be where they are because of the reflection of sunlight off ice crystals suspended in the air. You are seeing light rays from the sun which were originally headed for the part of the sky where the sun dog appears, at which point the light ray was bent toward you, causing you to see light from where it was bent instead of where it actually came from.
The brightness of sun dogs and the addition of halos and other arcs of light are related to the amount of reflected light that is able to reach your eyes without being scattered or reflected by other ice crystals. If there are too many crystals, there are no sun dogs. If there are too few, the sun dogs are dim.