The creation of the Earth is closely tied to the formation of the solar system about five billion years ago. The solar system condensed from a huge cloud of gas and dust, with the Sun forming as part of the cloud collapsed in on itself under the influence of gravity to the point where nuclear fusion could begin. The Sun’s gravitational field attracted large amounts of material, which formed a disc-shaped structure around it, known as an accretion disc. The Earth, like the other planets, was created around 4.54 billion years ago when some of the material from this disc came together to form a spherical body. At some point early in its history, it is thought that a smaller planet collided with this body, increasing its size and resulting in the formation of the Moon.
Star Formation
Stars form out of huge clouds of gas — mostly hydrogen — known as giant molecular clouds, as they consist of molecules. The first stars began to appear when the universe was cool enough for molecules of hydrogen to form. The parts of these clouds where the density is a little greater accumulate more gas through gravitational attraction, forming globular regions of relatively high density. These are known as “Bok globules,” named after the astronomer Bart Bok, and can be observed today in other parts of the galaxy. Parts of these globules condensed further under gravity, until the nuclei of the hydrogen atoms were compressed so much that nuclear fusion took place, resulting in the birth of a star.
The fluctuations in density that lead to the collapse of parts of a giant molecular cloud may be small variations that were present from the start. Alternatively, some event may compress parts of the cloud. One possibility is that the cloud may pass through the arm of a galaxy, where there is a greater density of pre-existing stars. Another is compression by the shockwaves from a nearby supernova.
Planet Formation
The material surrounding a new star orbits around it, eventually settling into an accretion disc. Out of this material, planets can form in two ways. Excess hydrogen, along with small amounts of other gases, can condense into gas-giant planets, like Jupiter and Saturn. The quantities of gas involved are not enough for the gravity to cause nuclear fusion, so they remain planets rather than stars. The other, much slower, way is for dust particles to clump together, forming larger masses that collide with one another and stick together until asteroids and planets form.
Rocky planets like the Earth could not have formed as part of the first wave of star formation as there was no suitable material available. At this point, there was just hydrogen and helium, both gases, and a trace of lithium, a very lightweight metal. The heavier elements required to form rock were created within stars by nuclear fusion. This process, however, can only create the elements up to and including iron. There are many elements that are heavier than iron present on the Earth and some of them are essential to human life.
The heavier-than-iron elements can only be produced by a supernova explosion. It follows from this that there must have been at least one supernova in the vicinity of the solar system prior to its formation. It may be that this is what triggered the collapse of the molecular cloud that formed the Sun and planets.
The Formation of the Earth
The processes that form stellar systems are still taking place and can be observed, at various stages, in other parts of our galaxy. The formation of the solar system is thought to have followed a similar pattern. There are, however, some particular events that helped shape the Earth as we know it today.
It is not known precisely what mechanism caused the collapse of part of a molecular cloud into the Sun and its accretion disc. Whatever the cause, when the center became sufficiently dense, it ignited to become the Sun. Streams of particles — known as the “solar wind” — from the new star banished gases to the outer solar system, where they formed the gas-giant planets. Pieces of rocky material remained in the inner solar system, where they could grow into planets.
Once the Earth formed, it began to heat up. This phenomenon was due to a combination of the decay of radioactive elements, the continuing compression of the planet’s material by gravity and meteorite impacts. As material melted, different elements became mobile, and the heavier ones, such as iron, gravitated toward the center, forming the core that is responsible for the Earth’s magnetic field. Lighter materials, such as silicates, floated on the surface, forming the crust. The relatively thin, solid crust on top of denser, molten material gave rise to plate tectonics and volcanism.
The early history of our planet was not smooth, but involved a series of events characterized by massive impacts. The greatest of these collisions may have created the Moon. Strong evidence suggests that shortly after its formation, the planet was hit by a Mars-sized body called Theia, which may have formed at a Lagrange point — a point of gravitational equilibrium — in the Earth's orbit. This collision would have ejected many gigatons of material that would then go into orbit and come together to form the Moon.