Final answer:
Comets are the solar system bodies that have orbits around the Sun which can be completed in a few years or extend to hundreds of thousands of years. They are different from asteroids, meteoroids, and planetesimals.
Step-by-step explanation:
Small solar system bodies that orbit the Sun in only a few years or on the order of hundreds of thousands of years are comets. Comets are icy bodies that, when approaching the Sun, heat up and display a visible atmosphere (or coma) and sometimes a tail. These features distinguish comets from asteroids, which do not exhibit such activity because they are composed mostly of rock and metal. Comets have highly elongated orbits that take them from the outer reaches of the solar system into the inner solar system near the Sun, and their orbital periods can range vastly as described in the question.
Asteroids, on the other hand, are rocky bodies that mostly orbit the Sun in the space between Mars and Jupiter, known as the asteroid belt, and do not have the dramatic appearances of comets. Meteoroids are smaller fragments that could derive from either comets or asteroids and can become meteors if they enter a planet's atmosphere. Planetesimals are ancient building blocks of the solar system, precursors to the planets.