Comets are the icy debris of the Solar System. They are essentially large amounts of ice with some dirt in them. A comet usually circles the Sun many times in its lifetime, spending most of its time in the outer Solar System. When the comet approaches the Sun, the heat it receives melts some of its ice, thus creating a large cloud (coma) around the nucleus. It also forms a tail, always directed away from the sun, of ice and dust.
There are two basic types of comets: short-period comets and long-period comets. The short-period comets go around the Sun in less than 200 years. The long-period comets go around the Sun in more than 200 years. There are two main sources of comets: the Oort cloud and the Kuiper belt. Comets from the Oort cloud, named after Jan Oort who proposed the cloud's existance, are the long-period comets, and the cloud is located from 1000 to 30000 AU from the Sun. On the other hand, comets from the Kuiper belt, named after Gerald Kuiper, are short-period comets, and the belt is located 30 to 100 AU from the Sun.