During its visit to the inner solar system, Hale-Bopp will follow a retrograde path in the sky because of the differing speeds of the Earth and the Comet in their orbits. This can also be seen in the paths of the outer planets, Mars, Jupiter, etc. The Comet isn't actually doing a loop-de-loop in space, it is just a perspective effect because we are standing on a moving planet!