The nucleus of Halley's Comet as imaged by the ESA probe, Giotto. The nucleus is the bit on the far right, a dark and irregular (Arthur C. Clarke called it peanut-shaped) chunk of primordial ice and dust. Comets are believed to exist in vast numbers in parts of the solar system called the Kuiper Belt and the Oort Cloud, but when some event sends them careering through parts more local to us, they react pretty badly: coming to pieces as their ice sublimes away and forms a conspicuous cloud.
The picture above is a great example of robot bravery - Giotto was seriously knocked around by debris from the comet, including one impact that put it into a spin so that its Kevlar dust shield was no longer constantly protecting its sensitive bits. The camera that took this image was eventually destroyed by another impact.