An ellipse is a slightly squashed circle. While most planets have orbits that are almost circular, they are still technically ellipses. The Sun is located at one of the two focal points of the ellipse, so the planets are closer to the Sun at some points in their orbit (perihelion) than at others (aphelion).