Dear student,
There are various theories that explains the formation of life on Earth. The most popular and accepted one is theory of evolution. By this theory, Bacteria have been the very first organisms to live on Earth. They made their appearance 3 billion years ago in the waters of the first oceans. At first, there were only anaerobic heterotrophic bacteria (the atmosphere was virtually oxygen-free at the very beginning). The first autotrophic bacteria, very similar to the current cyanobacteria, appeared approximately 2 billion years ago. Photosynthesis occurred in these organisms and this is how the atmosphere was enriched with precious oxygen. Cyanobacteria or blue algae made the primitive atmosphere breathable and allowed life to colonise the lands above sea level.
Thank you.