Comet 67P/Churyumov-Gerasimenko is a Jupiter-family comet. Its 6.5 year journey around the Sun takes it from just beyond the orbit of Jupiter at its most distant, to between the orbits of Earth and Mars at its closest. The comet hails from the Kuiper Belt, but gravitational perturbations knocked it towards the Sun where interactions with Jupiter’s gravity set it on its present-day orbit.
More about the evolution of the comet’s orbit: http://sci.esa.int/rosetta/14615-comet-67p/