Earth's uniqueness stems from the fact that it is has an oxygen-nitrogen atmosphere, is tectonically active and has liquid water. Differentiation of the early Earth developed a multi-layered planet that fueled by external and internal energy sources remains active today. The Earth consists of several different layers which can be distinguished either chemically or physically.
Current theory is that the solar system organized from a nebula - a diffuse cloud of solar gas.
The slowly rotating gas contracted under the force of gravity and eventually flattened to the form of a disk. Gravity continued to move material to the center of the disk and a proto-sun formed. Compression made the accumulating gases dense and hot till eventually nuclear fusion began. There was still some matter left in the nebula and local concentrations of matter will form planetismals which then collide and accrete to make planets. All of this activity was relatively quick on the order of 100 million years.