Answer
Newton’s second law is responsible.
Work Step by Step
The comet is moving when it is at perihelion, and it continues moving under the influence of the sun’s gravitational force, out to aphelion. In accordance with Newton’s second law, the sun’s gravity causes the comet to curve, and to slow down.