Because of the recent discovery of hyperstar solar systems, I thought I should explain the current knowledge we have about solar system formation. In order to understand these structures, a basic knowledge of Newtonian gravitation is in order. Gravity is an attractive force, ruled by two distinct factors: mass and distance. Everything in the universe has mass, with the exception of exotic particles like bosons. Objects with mass are attracted to one another directly in proportion to their mass and indirectly to their distance. What this means is that the more massive something is, the more attractive its force in relation to other things. Conversely, if an object is more distant from another object, it has less of an attractive, gravitational force. On Earth, we do not sense this effect because humans are more attracted to Earth than they are to other people and things. If we were in space, away from gigantic celestial objects, we would be like magnets when it came to smaller things. Paperclips would gravitate toward us. On Earth, paperclips are as drawn to Earth as we are, but in space they would be attracted to the next, more massive thing.
The most abundant element in the universe is hydrogen, and in areas where there is more hydrogen atoms than not, they coalesce to form a protostar ("before or first" star). Like a toilet bowl, everything is drawn around the protostar, some falling into it and some having the mass and tangential velocity to stay in orbit. In the case of our own solar system, there were massive mountains of material called "planetessimals" that would attract to each other to create the inner planets. As the proto-Sun became more massive, and it acquired the gravity in its core to fuse hydrogen into helium, due to the tremendous pressures and temperatures acting on the core. Once fusion began, the Sun (now a "star," instead of a protostar) blew off its outer layer of hydrogen gas to form the outer gas giants, which had their own menial planetessimal cores with enough gravity to hang onto the excess gas.