Like Mercury and Venus and the other planets that go around the Sun, the Earth probably formed a little more than four and a half billion years ago. (That’s about 4,600,000,000 years ago.) Like the other planets, Earth is made of molecules that were floating around in space. They made a nebula cloud of dust that was the leftovers when our Sun formed.
At first, just a few molecules clumped together. Then the clumps began to crash into each other and stick together to make bigger clumps. After a while there were big crashes as pieces of metal and rock hundreds of miles across smashed into each other. Finally they were big enough to be a planet.
The Sun’s gravity caught the new planet Earth (along with other new planets like Mercury and Mars) and pulled it into an orbit around the Sun. While the Earth’s momentum was always trying to carry it away from the Sun in a straight line, the Sun’s gravity kept pulling the Earth toward the Sun. So through centrifugal force, the Earth ended up going more or less in a circle around the Sun, about 92 million miles (150 million kilometers) away from the Sun. (Compare the reason that electrons go around the nucleus of an atom). It takes the Earth one year to go all the way around the Sun. (It’s moving at about 67,000 miles per hour, or 100,000 kilometers per hour. The Earth travels about a thousand times faster than a car drives on a highway.) That’s what causes the seasons to change: spring, summer, fall, and winter.
In addition to going around the Sun, the Earth also spins around like a top. It takes the Earth one day (24 hours) to spin around once. The spinning is what makes it look like the Sun rises in the East and sets in the West every day. And it’s why we have day and night. Night is when we are on the side of the Earth that is away from the Sun.
Here’s a short video showing how the Earth orbits around the Sun. (The big ball in the middle is the Sun, the colored ball is the Earth, and the tiny ball going around the Earth is the Moon.)