The Earth, like other planets of the solar system, moves on an elliptical orbit around the Sun counter-clockwise (when viewed from the north celestial pole) with an average speed of 30 km/s.
The Earth revolution is subjected to Kepler’s laws.
Kepler's First law states that the orbit described by a planet is an ellipse, where the Sun occupies one focus. The whole orbital circumference is about 940 million km.
Along the orbit there are these points:
Aphelion: for an object orbiting the Sun, this is the point where the object in its elliptical orbit is at greatest distance from the Sun.
Perihelion: The point of the orbit at the minimum distance from the Sun.
Kepler's Second Law states that the orbital speed is not constant but varies along the orbit. Near the perihelion, where the radius vector is shorter than at aphelion, the arc of the ellipse is correspondingly longer. So the orbital velocity is maximum at perihelion and minimum at aphelion and the consequence is that solar day at Perihelion is therefore longer than the average day and the opposite at aphelion, hence the unconvenience to use the solar day as a measure of time.
Like the day, there are even several types of years:
The sidereal year (or astral year) is the time the Earth needs to make a complete revolution around the Sun relative to the stars. So it is the interval for a fixed observer on Earth when the Sun occupies the same position among the stars after one year. The duration of the sidereal year is 365 days, 6 hours, 9 minutes and 10 seconds equal to 365.256 average solar days. This period was observed by the Egyptian observing the star Sirius, one of the brightest in the sky, but the use of fixed stars made it increasingly difficult to measure in ancient times.
The solar year or tropical year is the time interval between two successive spring equinoxes, or the time the Sun needs to return to the same location, after a complete cycle of the seasons. However the revolution of the Earth is not constant, but it is subjected to variations due to the different speed along the orbit (Kepler's Second law), because of gravitational interference by the presence of other planets and because of the precessing of the equinoxes (see later paragraph). The solar year is therefore better to observe than the sidereal year, yet all these changes do not make the solar year to be used as a precise reference. So it was defined a mean solar year, equal to 365.2422 days or 365 days, 5 hours, 48 minutes and 46 seconds, i.e. 20 minutes and 24.6 seconds shorter than the sidereal year.
The current calendar is based on the calendar or civil year, that is exactly 365 days, less than about a quarter of a day than the tropical year. Every 4 years it accumulates an additional day of delay. To correct this shift to the “normal" years of 365 days, every 4 years one "leap" year of 366 is added: the extra day is added in the month of February in leap year, which has 29 days instead of 28.
With a leap year the difference compared to the tropical year is reduced from minus 5.8128 hours to just 11 minutes and 14 seconds in excess.
The Gregorian calendar further reduced this difference by eliminating 3 leap years every 400 years from the calendar compared to the Julian calendar, i.e. in 1600 and 2000: thus the average length of 365.2425 days of the year becomes (365 + 97 / 400), reducing the difference at only 26 seconds in excess.