Answer:
The comet is locked in the Sun's gravity. as it falls deeper in the gravity we'll, its velocity increases. As is travels closer to the Sun, it is trying to break away, but cannot. This transforms into a sideways movement that produces a tight turn. It races further out of the gravity well, and sheds velocity.