Creosote is a mixture of a lot of nasty chemicals, but the main component is tar, which is why railroad ties are coated with creosote mixtures to keep them from rotting. It is also what preserves smoked meat and imbues its characteristic taste.
During combustion, creosote particles rise up the chimney with the smoke. As it rises, it mixes with cold air and water vapor which causes it to solidify and stick to the liner or the brickwork itself, in the case of unlined chimneys.
Besides the obvious problem of built-up creosote catching fire, is that as it accumulates, it in turn perpetuates ever increasing levels of buildup. The lack of open ventilation induces creosote accumulation, which narrows the chimney, restricting ventilation even further, and causing larger amounts of creosote to accumulate. This cycle is repeated until the chimney is totally blocked or a fire happens.