As far as is known, at its birth 4.6 billion years ago, our planet was an inhospitable pile of rocks accreted from cosmic debris, hot inside and cooling on the outside. Water and an atmosphere were present and crustal rocks began to form at once (the oldest being 4.3 billion years old). The mantle was convecting and volcanism was intense. Big asteroids kept on coming in, producing craters and large-scale disturbance. Life arose from this life-less but churning mess sometime during the first several hundred million years of Earth's existence, but the details are inaccessible. The oldest trace of life may be a chemofossil from a 3.8 billion year old rock in Greenland. The fossil consists of phosphatic minerals with inclusions of elementary carbon having an unusually high ratio of 12C/13C, suggesting an organic origin.
What life forms might have looked like at the beginning is to a large extent a matter of defining "life". If a sharp boundary can be drawn between living and non-living matter, then the origin of Life had event character, and all the later organisms trace their ancestry to this event. If the boundary is fuzzy, with different types of proto-life forms populating selected environments (in essence, associations of replicating molecules) then the origin is more properly seen as a gradual emergence of replicating systems. In any case, apparently one type of system won out over all others, and the winner was around by 3.5 billion years ago.
Evidence for microfossils (things looking like tiny bacterialcells in stone) first appears at that time of about 3.5 billion years. By this time, then, a billion years after the origin of the Earth, Life was well on its way to spread to all available environments, transforming the planet into the very special place that we know and treasure. It is possible that Life arose several times at the age of origin, but that giant impacts destroyed the beginnings and reset the clock. Or, several competing life forms may have arisen and eventutally only one survived. Alternatively, Life only arose once. The problems that had to be solved included maintaining the identity of a replicating organism that assimilates other organic matter to grow, and conserving tried-and-true portions of the genetic program while experimenting with other portions. At some point, environmental conditions had changed so dramatically that it was no longer possible for living organisms to arise from non-living matter. From there on, it was evolution by inheritance and mutation that governed the rise of new life forms.
Some scientists have suggested that the origin of life is such an improbable event it is hard to believe that it could have happened in the early youth of the planet, in the relatively short period of several hundred million years. (Although this time span was enough, much later, to get to people from fish.) It is conceivable that multiple unrelated life forms could have arisen, each using fundamentally different types of proteins as building blocks. It is not clear at all what prevented this sort of thing from happening, and why we ended up with life forms that are able to interact (that is, serve as food or hosts for each other). Perhaps once all the right inventions for generating evolving life forms were made, the winner appropriated much of the inorganic resource base. Perhaps there were no competing life forms to begin with.
One possible solution to the conundrum of improbability is the idea that Life came from outer space. In this scenario, named "panspermia" by the famous Swedish chemist Svante Arrhenius, life forms are traveling around in space, frozen within rocks, until they happen to hit a planet environmentally ready to take on the task of hosting living things. If we could make Life anywhere in the galaxy and then send out seeds to colonize nearby solar systems, we would increase the chance of "starting" Life by the number of planets ready to produce it. If only one tenth of the sun-like stars in the galaxy have an eligible planet (our star may have three such planets in addition to Earth!) this would increase the likelihood of Life by a factor of a billion.
There are (at least) two problems with this panspermia story. First, the universe apparently does have a beginning (called the "Big Bang"), and this beginning is definitely not far back (about 16 billion years, only four times the age of the Earth). This cuts out infinity as a means to boost probability. Another problem is that Life does not keep well in space for the long time periods required for interstellar travel. Cosmic rays would keep bombarding the organism, slowly destroying its code for replication. While frozen, an organism could not repair such damage. Upon arrival on a friendly planet, the space-traveling seed would be unable to spring to life, its code being utterly corroded.
The simplest and most likely hypothesis is that Life arose on Earth or somewhere else within our solar system. If that was the case, all the same problems of reconstructing the origin remain. Finding a rock from Mars (which has been done) with evidence for a life form (which has been claimed) would prove that such exchange is possible. It would not indicate whether such exchange took place or, if it did, in which direction it went. If it did happen, however, transfer of rocks from Mars to Earth is more likely than the other way around. (Can you specify why?)
Life may have been present on Earth around 3.8 billion years ago, right after the presumed end of Late Heavy Bombardment. (The duration and end of the Late Heavy Bombardment is currently in controversy.) It probably was present before that, but we have not found the evidence. The bombardment must have destroyed much of it. (We can see the effects of bombardment when we look at the ancient cratered face of the Moon.)