Use just enough wood to keep the fire burning, allow in enough air to have a flame and only start a fire when you need one. But even with these precautions, chimneys must be cleaned to prevent fires. Sharp recommended yearly chimney inspections. If you keep it clean, there is no way for a chimney to catch on fire. If a chimney fire does start, call the fire department.
Wood heaters have dampers that sometimes can be closed to block the air flow to the fire.
Water also can be sprayed on the roof to prevent the fire from spreading. Chimney fires require specific conditions to start. There must be enough creosote in the chimney to sustain a fire and enough heat to start one. Creosote ignites at temperatures of 800 degrees or higher. Another fire hazard is flammable material near the fireplace or heater, especially around the door.