How was the atmosphere created?
The first atmosphere was probably compose by h2 and he, but since Earth's gravity wasn't strong enough to hold the light gases, they are now rare in the atmosphere.
This atmosphere was created from volcanic gases. Which most volcanoes still create: H2O, CO2, SO2, CO, S2, Cl2, N2, H2, NH, and CH4. However, the atmosphere still lacked one important component: oxygen.
As the earth cooled down oceans started to form, since it gave an opportunity for H2O to exist in liquid form. As a result, water molecules started being broken down by ultraviolet rays, which led to the creation of the Ozone layer. Since Earth was protected from harmful ultraviolet radiation an essential process started: photosynthesis. Cyanobacteria started to produce the oxygen in our atmosphere, and were later joined by other higher plants.