Since i was interested in space all my life i studied lots of information about space, but i never understood, how do gas giants form? Anybody can answer a difference between regular planet forming and gas giant forming?
But to my understanding as a star lights up most of the gas and dust is blown away to the farther reaches of the system. Any inner planets wouldnt have a large supply of gasses but the outer ones would.
The theory of planet formation is changing rapidly with many active debates.
So only a broad outline, starting at the point where the gas cloud has contracted to a disk with a proto-star at the center.
Also ignore migration of giant planets; which gives rise to the close-in hot Jupiters/Neptunes maybe some super-earths.
At all distances, solid cores form or a ranging in mass from less than the Earth mass to several earth masses form. These are generally bigger and more numerous beyond the "snow line". The snow line is the distance where ice can condense out of the disk. In fact the general pattern of denser planets closer to the sun than further out is explained by the temperature decreasing with distance from the proto-sun. At Mercury minerals/elements with higher condensation temperatures can form solid grains. Higher density materials generally have higher condensation temperature.
Water is common in the universe so there is just more solids frozen out beyond the snow line, so the cores are bigger say round the few earth masses. Through collisions, gravitational interactions these cores are whittled down. All cores can accumulate hydrogen helium atmospheres, but in colder parts of the disk it is easier. Some cores will outpace rest and grow to giant planet size (Jupiter/Saturn or larger), others Nepture/Uranus size then on down.
Meanwhile the star has contracted and started nuclear fusion. It now starts with a strong stellar wind, and much brighter than latter on (T Tauri stage) The strong wind impacts the planet atmospheres, the smaller planet cores (like the proto Mercury to Mars) are too small and the gas too warm to be held in the wind. While further out the giant mass planets can hold onto most of thier atmosphere of Hydrogen/Helium. Also the wind is also a bit weaker further out.
Statistically speaking this general picture we expect to see a lot more medium sized (Neputune and Superearth mass 8 -20 ish Earth mass) planets than Jupiter/Saturn mass (320 and 95 Earth mass respectively). Initial results from microlensing surveys support this expectation. However there is a lot of debate about both the details and large parts of the overall picture. I personally like the Modern Lapacian model, but its not main stream as above.
Oh the atmospherses of Venus Earth Mars come from inside the planets. Though some could be brought in as comets.
Because there was more material available in the outer solar system (not as much vaporized by the sun) once the planetary core forms it continues to draw in material, which makes it more massive, which makes it draw in more...etc. Finally, the protosun blows enough "stuff" away that the process pretty much stops.
It also seems very likely that Jupiter & Saturn formed very quickly, whether they formed around potential super Earths that became their cores or whether they form from condenstaion points within the huge anullus of hydrogen orbiting the proto sun is currently unknown (this is one of the objectives of the upcoming JUNO, Jupiter polar orbiter & Cassini was almost carrying a JUNO type mission around Saturn last year). Either way it appeared that both formed very quickly, particularly Jupiter.
Uranus & Neptune formed from more ices than gas (though both do have deep hydrogen rich atmospheres with methane in their tropospheres), with the likes of the KBOs, from larger ones like Eris, Pluto, etc forming from icy / rocky material on the outer rim of the protoplanetary system.
This also explains why the densest planets, Mercury, Venus & Earth as SpaceTas correctly pointed out are the closest to the Sun, as this part of the protoplanetary disk was being kept warm by the proto sun.
Mercury being a great example, having the greatest uncompressed density of all of the planets, having an iron core (that now appears to be dual layered) that contributes approx 75% of Mercury's mass & occupying approx 40% of Mercury's volume.