Comets are icy, small Solar System bodies that, when passing close to the Sun, heat up and release gases, forming a visible atmosphere or coma, and often a tail. Asteroids are mainly composed of rock and metal and are much larger and more massive than comets.