The Earth's crust, its outermost layer, formed about 4.44 billion years ago, roughly 100 million years after the formation of the Earth itself. Prior to 4.44 billion years ago, the Earth's crust was entirely molten, due to residual heat from the planet's initial collapse. Evidence that the Earth's crust cooled within 100 million years comes from measurements of hafnium levels in the Jack hills in Western Australia, one of the oldest areas of exposed crust today.
During the initial formation of the Earth's crust, an event known as the Iron Catastrophe occurred, where the denser elements of the Earth's composition, such as iron and nickel, sank to its core, while the lighter elements, like silicon, formed a crust at the top.
The crust began to cool when the Earth was at least 40% of its current size, possessing enough gravity to hold down an atmosphere containing water vapor. Much of this early water vapor would have come from comets. This era in the Earth's history, extending from the Earth's birth to about 3.8 billion years ago, is known as the Hadean era, after the Greek Hell, Hades, for the difficult conditions on the planet at the time. Scientists believe the Hadean era was lifeless.
Around 4.0 to 3.8 billion years ago, towards the end of the Hadean era, the planet underwent the Late Heavy Bombardment, a period of time with many large asteroid impacts. These impacts may have literally shattered the virgin Earth's crust, preventing the creation of any long-lasting continents. In practice, looking back beyond 3.8 billion years ago is difficult, as the oldest rock formations are about this age. The only earthly minerals older than this are individual rocks and crystals, which give less information about the overall global state of the Earth's crust at the time.
About 2.7 billion years ago, photosynthetic life evolved. It released huge amounts of oxygen, isolating it from water in the process of photosynthesis. The Earth built up an oxygen atmosphere, and the oxygen began to bond with most of the elements on the surface, creating huge amounts of oxides. Today, most of the Earth's crust is composed of silicon oxide.