Because comets are composed of rock, and frozen gasses of different kinds. As they approach the sun, the frozen gasses return to their gaseous state (a process called sublimation) and stream off behind the comet. In addition, some of those gasses get ionized and form a secondary tail (which isn't always visible to the naked eye).
Sometimes the comet is flung back out into interplanetary space, to return again at some distant date. Sometimes it is completely destroyed by the sun's radiation.
However, comets also leave behind tiny bits of dust and rock that hang out in space, much the way smoke hangs in the air here on Earth. If this debris trail happens to cross the orbit of the Earth, the stage is set for a meteor shower. As Earth passes through the debris from the comet, the pieces of dust enter our atmosphere and burn up. Since the debris field isn't exhausted as Earth passes through, it can cause a recurring meteor shower.
In the case of Haley's comet, the recurring meteor shower it causes is the Orionid's meteor shower. The name of any meteor shower comes from the constellation the meteors appear to come from (known as the radiant)
The best time to view the Orionids is well after midnight, when Orion is highest in the sky. Forecasters are predicting up to 20 meteors per hour for this year's shower. The best way to observe any meteor shower is to bundle up and lay down in a lawn chair.
Image of meteors from Orionid's Shower Created with Stellarium |