Comets are cosmic snowballs of frozen gases, rock and dust roughly the size of a small town. When a comet's orbit brings it close to the sun, it heats up and spews dust and gases into a giant glowing head larger than most planets. The dust and gases form a tail that stretches away from the sun for millions of kilometers.