They form in the ocean where undersea volcanoes are errupting. The magma turning into lava piles up on top of itself over lots of time to form land.
The apmosphere climate changes
i hope this is the answer you are looking for.
The end of the book is the best
4.6 billion years ago - most likely hydrogen (H2) and helium (He)
probably rich in hydrogen compounds like methane (CH4), ammonia (NH3), hydrogen cyanide (HCN), water (H2O), and formaldehyde (HCHO). Also some N2, CO2 but LITTLE or NO free oxygen.
Molecules of H2 and He move really fast, especially when warm, that they eventually all escaped Earth's gravity and drifted off into space.