The evolution of life on Earth begins an extremely long time ago: approximately 4,000 million years in the past. Life began shortly after the crust of the Earth cooled and well-defined continents and oceans formed, when the planet was only about 600 million years old. This ancient period is called the Hadean eon for the unpleasant circumstances which prevailed on the planet at that time. Despite heavy meteor bombardment and surface temperatures much higher than today, primitive self-reproducing RNA and DNA strands somehow emerged, and eventually evolved into proto-cells that are the ancestors of all earthly life.
There are a still a lot of things we don't know about abiogenesis, the scientific name for the origin of life and the starting point of evolution. It may have originated deep underground, or at hot spots in the ocean with the right chemical reactions. Because the atmosphere at that time completely lacked oxygen, the first simple cells used carbon dioxide as a carbon source and oxidized inorganic materials to extract energy. In any case, this earliest life didn't leave any fossils, so we don't know much about it.
Some of the first known life forms were prokaryotic (nucleus-free) cells that may have started leaving basic microfossils around 3.5 billion years ago. These cells used glycolysis, essentially, the conversion of sugars into ATP, as the basis of their livelihood. Around 3 billion years ago, possibly the most significant milestone of evolution prior to the emergence of our species occurred. It was the advent of photosynthesis, pioneered by the cyanobacteria which now cover the earth's surface in huge numbers. Using water as a reducing agent, they produced oxygen as a byproduct, causing atmospheric levels of oxygen to rise and keep rising. This milestone in evolution was called the Oxygen Catastrophe because it massacred most organisms worldwide, which could not survive in an oxygenated environment. We can tell when this happened because the strata from the period begin to contain iron oxide, or rust.
2,100 million years ago, more advanced cells called eukaryotes evolved, with nuclei and specialized organelles. Humans are big blobs of eukaryotic cells. It took another billion years until complex multicellular colonies were generated by evolution, followed by the descendants of all animals, choanoflagellates, only 600 million years ago. These were the first multicellular organisms with specialized components that allowed them to navigate around for food and evolve crude sensors. Evolution had created our precursors.
The evolutionary advance that led to all basic body plans, and complex organisms in general, was the Cambrian explosion, the jump in evolution which occurred around 542–530 million years ago. This set the stage for everything else. It was only a matter of time until life started colonizing the land, developing complex nervous systems, and eventually, intelligence.