As a hazard
Fire is capable of destroying crops, resources, structures, and can injure or kill pawns. It spreads via embers that travel up to two tiles and will start another fire if it lands on something flammable. Fire may spread far and wide if left unchecked. Colonists capable of firefighting will only fight fires in your Home area. To make them fight fires outside of this area, use the "Expand home area" tool in the Zone/Area section of the Architect menu.
A good way to prevent fire from spreading is by using firebreaks. Firebreaks are non-flammable flooring, typically concrete, with a minimum width of three tiles. Place firebreaks outside of colony perimeter walls and around other important structures. Another key step to preventing fire is to use non-flammable materials for walls.
Pawns on fire will become momentarily disabled by panic and will attempt to extinguish the fire by putting it themselves or finding a water body. They may also wander into unsafe open areas where they might be vulnerable to attacks. If this occurs, the player can prioritize a different colonist to attempt to put out the flames of their burning comrade. Also note that pawns on fire can also spread fire which can lead to a cascade effect. They cannot be controlled in this panic state.
While on fire a pawn will receive 2 heat damage per second regardless of the flame size. Heat damage has no armor penetration and is therefore easily affected by heat resisting apparel. If the fire is not extinguished eventually a pawn will become incapacitated and burn until death
At higher temperatures (above ~235C/455F/508K), flammables can spontaneously ignite, and an orange haze effect will appear. Pawns trying to put out the fire may collapse from heatstroke. To prevent pawns from succumbing to the heat in an enclosed room, simply either remove some of the roof or hold one of the doors open, and then tend to the fire.
Objects and structures on fire will take damage to their hit points over time. The damage taken value is the same for everything. The size of the fire depends on the flammability of the material. Objects with 0% flammability can't catch fire.
As a tool or weapon
Fire can be utilized as a weapon or tool to counter things like infestations or to help capture enemy pawns.
In an killbox corridor, a small detachment with doors connecting to the outside should be constructed. Additionally, add stone doors at the end of the corridor, but hold them open for now. Wooden barricades should the be constructed inside the detachment. Near it, build a shelf with incendiary weapons for convenience. When enemies arrive, wait until all of them have entered the killbox, then light the barricades on fire with incendiary weapons. Then, close the two doors at the end. The raiders will drop like flies after a while. Once their heatstroke reaches 0.7 severity (70% percent, extreme heatstroke), open the doors and put out the fires. Capture the pawns you want, and let the rest flee. But then again, you could just execute them all.
Countermeasure against infestations
Infestations are difficult to clear, especially when spread through multiple (mined out) caves.
An effective method is to equip a colonist with an incendiary launcher or molotov cocktails and attack the hives one at a time.
Should one of your caves have power conduits running through all the area and completely sealed with roof, they could be used to spread the fire by closing the caves with walls and then simply shoot at a conduit to ignite. Insectoids will collapse and eventually die of burns or heatstroke, hives will ignite if the temperature gets high enough for spontaneous combustion.
A faster alternative to "Cut plants" to clear areas from vegetation that provides a tactical defense as it takes any possible cover object away from enemies. Equip an incendiary launcher or molotov cocktail and target to attack the desired area. The fire will spread rapidly in all directions, so the player must ensure there are no flammables near unintended sections. Rain will extinguish fire on unroofed areas.
Firefighting is most often accomplished by colonists "stomping" on the fire until it goes out completely. Another method of extinguishing fire is by deploying firefoam poppers that when triggered by flames will explode to blanket the area with fire-suppressing foam.
You can also blow fire out with an explosion like that produced by a grenade (draft a colonist who has grenades, target the fire).
Colonist firefighting behavior
By default, all colonists not currently working on another job will go to extinguish a fire, if capable, and only if the fire is within a designated home area. Unlike other tasks that get reserved, colonists do not lock out each other from fighting the same fire and may work together to extinguish it quicker.
It is worth mentioning again that colonists only fight fires within a home area. Outside the home area, colonists will just ignore the fires and carry on with their duties. To fight fires outside of a home area or to fight fires in a coordinated manner, draft the colonists and place them NEXT to the fire. They will fight any adjacent fires and you can better move your colonists to strategically attack it.
Colonists can catch on fire while firefighting but will usually manage to put out the fire. If instead they become downed, the fire will consume them unless another colonist comes to put them out.
Pyromaniacs will never extinguish fires and in fact may sometimes start them.
After their initial construction, firefoam poppers can be uninstalled and stored. Reinstalling them later—near a small-to-moderately sized field of fire—and manually detonating them allows a single pawn to quickly and safely complete a dangerous task that could otherwise occupy several pawns for many danger-filled hours.
Extremely large and long lasting fires will force a rain event. Rain will stop the spread of unroofed fires and eventually extinguish them.