Creosote is a mixture of chemicals which combine as a result the combustion of wood (wood creosote) or coal (coal tar creosote.) It's used as a wood preservative and that's why you think of it coming from telephone poles and railroad ties. It's also used in bird repellants, insecticides, and treatment for Psoriasis.
It can accumulate in chimneys when hot gases rise and condense on the walls of the flue. It may build up enough to become flammable. Hence the need to clean your chimney ever so often.