When the Earth was formed, it didn't look a whole lot like it does today.
When the Earth first cooled enough to have a solid surface, some hundreds of millions of years after it formed, the atmosphere was, to us, a toxic mess. Carbon dioxide, water vapor, carbon monoxide, ammonia, methane... but no free oxygen. O2 is very reactive chemically, so it was all locked up in other molecules.
Eventually Earth got wet. The water either came up from underground (volcanoes and such) or it fell from the skies as comets, but either way we got oceans. Complex chemicals arose in those oceans, and then, one fine day, a complicated chemical indeed was able to make duplicates of itself. It went forth, and multiplied. Eventually this became life -- able to ingest, excrete, and multiply.
A billion years later, land formed and became a permanent feature of the young Earth. Volcanoes had been primarily undersea, but now they became land-based as well. When this happened (or so it's thought) they started belching out oxygen into the atmosphere the volcanic emission stopped stripping oxygen from the atmosphere. At some point, some (probably) unicellular form of life was able to metabolize the chemicals in the atmosphere, and excrete oxygen. Note added later: Up to this point, volcanoes had been primarily undersea, but now they became land-based as well. When this happened (or so it's thought) they stopped stripping that oxygen out of the air, allowing it to accumulate.
Either way (or, more likely, both), the air changed over time, became oxygenated.
The atmospheric levels of oxygen rose... and eventually some form or forms of life evolved to use that waste product. Since oxygen is chemically reactive and releases lots of energy when combined with other chemicals, it's an excellent fuel. The life that was able to utilize it had more energy, and wound up dominating the planet.
That, over time, eventually became us.
The release of O2 is called the Great Oxidation Event (though I think that should be Oxygenation), and it is thought to have happened 2.3 to 2.4 billion years ago (over 2 billion years after the Earth formed). But scientists have now found that it may have happened a little earlier than that by 50-100 million years.
They took a kilometer-long core sample (and may I say here, YIKES! That's a big core) from Australia, and by analyzing its composition they were able to determine the atmospheric content from all those eons ago. From that, they found when the Earth's atmosphere started getting its oxygen. In other words, the actual increase of O2 has been seen for the first time.
"We seem to have captured a piece of time during which the amount of oxygen was actually changing -- caught in the act, as it were," said Ariel Anbar, an associate professor at Arizona State University, Tempe, and leader of one of the research teams.
That gives me chills. Imagine! 2.4 billion years ago, the Earth was mostly covered in ocean. The ocean wasn't blue, it was probably greenish due to the high levels of iron and lack of oxygen. Breathing the air would have killed you in minutes. And somewhere, deep in all that murk, a little tiny cell split in half, and the copy wasn't perfect. Did a cosmic ray zap it? Was there some environmental pressure that altered the gene map? However it happened, the daughter cell's chemistry zigged instead of zagged, and it was able to use oxygen, which was probably a poison to life up until then. Trillions of generations and far, far more DNA alterations later, and we can dig into the Earth itself and see how all that lovely oxygen got things started.
This story isn't over yet, but we're starting to be able to read the beginning.