The Earth formed from a proto-planetary disk around the Sun about 4.54 billion years ago.

An excerpt from the article 25 facts about Earth

For its first billion years, it was a hostile, harsh, rocky place where life did not exist. According to research, the first living organisms appeared in Earth's oceans about 3.5 billion years ago.