What’s the difference between a comet and an asteroid?

They both orbit the sun, but they're very different.