After the Big Bang, the universe was made up of the two lightest elements: hydrogen and some helium. Nucleosynthesis was responsible for creating heavier elements; young stars form helium out of hydrogen.
In the later stages of a massive star's life, helium is converted into heavier elements like carbon, oxygen, silicon, and iron. When a star goes supernova, they create elements heavier than iron. Elements with even atomic numbers are an order of magnitude more common than odd ones.
The most common elements in our entire planet are oxygen, silicon, iron, magnesium, calcium, aluminum, sodium, potassium, carbon, hydrogen, nickel, and sulfur.
They form the ten oxides, listed below, that make up the majority of rocks found on the Earth's surface.
- SiO2 (60%)
- Al2O3 (15%)
- CaO (5%)
- FeO & Fe2O3 (7%)
- Na2O (4%)
- MgO (3.5%)
- K2O
- H2O
- CO2
These oxides can form because oxygen is so readily available at the earth's surface -- in fact, by mass, oxygen makes up almost 50% of the earth's crust, followed by silicon (25%), aluminum (10%), iron (5%), calcium (5%), sodium (3%), magnesium (2%), and trace elements.
Material from my notes for EOS 201L: Earth Materials, Duke University, Fall 2013.