Asteroids and comets both orbit the Sun, and are the remains of objects formed in our Solar System. Sometimes their unusual orbits bring them close to planets and moons.
The difference is in their composition. Asteroids typically comprise rocks and metals, while comets also have ice, dust and organic matter in addition to the rocky material. Asteroids stay stable and solid, but if a comet gets close to the Sun, some of its ice melts off.
That’s what gives comets their characteristic tails’ – fuzzy trails pointing away from the Sun that contain ice and compounds such as ammonia It’s likely that Asteroids would have formed closer to the Sun, while comets formed further away in the Solar System, making them able to retain ice.
Some astronomers theorise that comets could have formed closer to the Sun, before being flung out by gravitational forces from gas giants like Jupiter.
Another difference between comets and asteroids is that the former can have huge, elliptical orbits, while asteroids usually have circular, shorter orbits.