The Earth formed around 4.54 billion years ago. As of 2019, our first evidence of life appears in fossils somewhere around 3.77-4.22 billion years old. The particular date is still much debated, as the Earth’s crust had not cooled enough to form continents until about 2.5 billion years ago and there was a rapid turnover (melting and reformation) of rocks up to this point. Additionally, these early life forms were so small and simple that some argue the fossils are likely complex mineral structures, not organisms at all.
The earliest fossils are interpreted to be unicellular organisms similar to modern day cyanobacteria, sometimes referred to as blue green algae. The most widely accepted of these fossils dates back to 3.4 billion years ago from the Strelley Pool Formation in Western Australia. These particular fossils are called stromatolites and are composed of alternating layers of fossilized cells and calcium carbonate. We can use evidence from modern day stromatolite formation in Western Australia to infer that these fossilized cells were doing a process called photosynthesis, using dissolved CO2 in the water to form sugar molecules. This causes calcium to precipitate out of the seawater, forming hardened layers of calcium carbonate on top of the colony of organisms. Because they need access to light to continue photosynthesizing, living cells begin forming a new layer on top of the calcium carbonate. This process continues, making a ringed pattern as the formation grows, much like we see in trees and corals.