In the beginning of Earth, there was no atmosphere and the surface of Earth was molten. Time passed and the surface slowly cooled, releasing gases like hydrogen, methane, sulfur, and 10-200 times as much carbon dioxide than there is today. Living organisms emerged, and they were able to utilize the gases present to gain energy. At the time, oxygen was very scarce and only present in compounds like water, so these early organisms didn't use oxygen for energy. Eventually, cyanobacteria came to be, and they could do photosynthesis, causing them to release oxygen as a by-product. They also used methane to gain energy, so over time the methane was greatly diminished and the sky became blue. The oxygen also started to oxidize the iron on the surface, creating redbeds. Organisms eventually evolved to use oxygen to gain energy, and the organism that didn't died off due to the oxygen being poisonous to them. Sea life flourished during this time period, and it was known as the Cambrian Explosion. Soon life could live on land, and plants also began to flourish, causing the Carboniferous period. During this time, oxygen levels were very high, and they caused organims to be much larger than they are today. Normally, when living organisms die, they decompose and release CO2, but during this time, the dead organism were buired underneath swamps, and the carbon dioxide was trapped there, causing the Earth to cool down. This CO2 is now being used in the form of coal and oil for energy today, and this is releasing the trapped CO2, causing climate change and global warming. This heralded in the Eocene Epoch, where the polar ice caps weren't fully frozen and the Earth was more evenly warmed. Earth has cooled down since then due to other events, and now we have our current atmosphere. However, the greenhouse gases being emitted is causing the Earth to get warmer, causing climate change and global warming today.