Ever since I observed the depictions of the Solar System, I was obsessed with the question of why the gas giants (outer planets) have very large orbits, compared to the planets that are closer to the Sun. Is it because of their mass or something I have ignored?
The current explanation for this is something called the frost line (which changes over time). At greater distances from the Sun, a body will receive less and less radiation, and so it will be colder than if it were closer to the Sun. Eventually, conditions become cold enough for volatiles to condense into grains. These volatiles make it possible for large-scale accretion to happen, and thus giant planets are formed. They may become gas giants (like Jupiter and Saturn) or ice giants (like Uranus and Neptune), depending on the composition of the protoplanetary disk at a given distance.
A graphic (from here) gives a better summary, although it's copyrighted.
As one gets farther from the sun, the gravity from the planets themselves becomes relatively stronger. So if a body were in an orbit between, for example, Jupiter and Saturn, those two planets would soon make the intermediate body's orbit change. This is conceptually related to the latest definition of "a planet"; A planet must clear its general vicinity of other stable orbiting bodies.
When the solar system formed, there was an accretion disc, spinning around the newborn Sun.
The Sun was emitting radiations, which pushed the lighter materials of the accretion disk (gases) further away, and kept the heavier materials (rocks) much closer. This is why gas giants are almost always further away than rocky planets. Almost.
In the case of "hot Jupiters", astronomers think that they simply spiraled their way to their star, "eating" smaller planets on their way. It doesn't happen in our solar system because Saturn holds Jupiter back.
Exact source nowhere to be found on the internet, but everything I wrote here comes from a very interesting movie I watched in "La Cité de L'Espace" (Space City) in Toulouse, France. It is a famous exposition / museum about astronomy and space exploration.