Insulator and flammable are two different things. Wood is considered an insulator because it fails to conduct heat. This means that it will not transmit heat from one point to the other. However, wood is dry and can catch fire. In this case, it is flammable rather than an insulator. Hence, the two factors are different properties of the material.
They are unrelated with one another and due to different physical aspects of wood. On the other hand, if we consider plastic, it also displays the phenomenon. It is an insulator of heat but melts away when brought close to fire.
Wood is an insulator because it does not conduct heat from one point to the next. By nature, wood does not actually burn. Instead, it vaporizes. When wood gets heated, the molecules that are present in it break and result flammable gasses. These gasses then get mixed up with the air.
Hence, the burning of wood does not have anything to do with the conduction of heat. Hence, wood can remain an insulator for heat and be able to burn at the same time. On the other hand if you would compare it with metals, metals do not burn rather they get very hot until they melt, except in very extreme circumstances.