A discussion of minerals must begin with the formation of the earth.
Planet earth was formed from rocks and minerals. But there was a time when there existed not even chemical elements, the building blocks from which rocks and minerals are made. Between 13,000 and 15,000 million years ago, the entire Universe consisted of just a tiny dot of primordial energy.
In a moment, the Big Bang set in motion a chain of events that resulted in the creation of atoms, and over millions of years, in the formation of galaxies and stars. It was only within the stars that elements formed ,and these would in turn form minerals, rocks and planets.
The rocks and minerals we see on Earth today are the outcomes of an ongoing series of processes that began with the initial creation of the Earth from the Solar Nebula over 4.5 thousand million years ago, and which will continue for at least as long into the future.
At the impact of a large planetesimal on planet earth, the material splashed out of the earth formed the moon, along with a portion of the planetesimal itself. The other debris of this massive collision was held in orbit by the Earth’s gravity and gradually cooled and coalesced onto the surface of moon. This process of accretion formed the Earth’s natural satellite, which is the moon we see in the sky today.
The Earth has three distinct layers. The innermost layer is the core consisting of a solid inner core and a fluid outer core, which together make up more than half of the planet’s diameter. This core is thought to resemble the composition of iron-nickel meteorites. The outer core is believed to be molten iron, similar to the molten iron created by human skills in a foundry. The next layer is the mantle, a layer of dense minerals making up most of the rest of the Earth’s diameter. The outermost layer is a thin crust composed of rocks and minerals chemically distinct from those of the core and mantle.
The formation of the earth’s crust was directly connected to the creation of the atmosphere and the oceans. During the period of intense accretion, as the earth melted and recrystallised, water vapour collected to form oceans. A second atmosphere was created, at first with little oxygen. As life developed in the seas, oxygen was released, creating today’s environment.
Reference: Rocks and minerals the definitive visual guide by Ronald Louis Bonewitz