Why is there perihelion and aphelion of a planet's orbit?
Due to Elliptical Orbits.
Johannes Kepler was the first to suggest that the orbits of Planets are not circular but ellipses given the unusual positions of Planets like Mars in the Sky. Further Newton with his Mathematics proved this correct. According to Kepler, the orbits of planets in the Solar system including Earth are not circular but Elliptical with Sun being one of the focii. As a circle has a center, ellipse has two focii.
The Semi-Major axis of the Orbit will define the average distance between the Sun and the Planet.
So, if the orbits are not circular then this would mean that the distance between the Sun and the Planets is not constant as in case of a circle but it is changing. Sometimes the Sun is closer to the Planet, sometimes it is further away.
Perihelion is defined as the point in the orbit of a Planet when it is closest to the Sun.
Aphelion is defined as the point in the orbit of a Planet when it is farthest from the Sun.
We can also calculate the Perihelion and Aphelion distances if we know the Semi-Major axis and the eccentricity of the orbit.
Perihelion = a ( 1 - e )
Aphelion = a (1 + e )
a is the Semi_major axis
e is the eccentricity.
Lets take the example of our own planet. The Earth,
The Semi-Major axis of the Earth's orbit is about 149 million km.
Eccentricity is about 0.0167
from the formulas we will get,
Perihelion = 146 million km.
Aphelion = 152 million km.