The shape of Earth's orbit is an ellipse, which resembles a stretched circle. Earth's orbit lies on the plane of the ecliptic, an imaginary plane in which the sun and the planets move. Earth revolves around the sun in a period of 365 days.
Earth orbits the sun partly because of its own motion and partly because of the sun's gravity. The formation of the solar system was so forceful it shot Earth out on a path that it would still be traveling on if not for the gravity of the sun. The sun's gravity acts like a giant string and keeps Earth on its elliptical orbit.
Earth does not always orbit the sun at the same distance. Perihelion is the spot where Earth is closest to the sun; aphelion is the place where Earth is farthest from the sun. At aphelion, Earth is approximately 156 million kilometers away; at perihelion, Earth is about 146 million kilometers away from the sun.