How does a comet travel?

Comets orbit the Sun just like any of the planets or asteroids, but commonly they have a more eliptical orbit and therefore usually only become visible when approaching the Sun.