"Threat" is how much of a threat the OF considers the RF at the moment. It will slowly decay unless any of the "modifiers" below occur. It controls how many resources the OF is allocated per 6 hours in-game time.
Threat starts at a base value set by the difficulty settings, and it cannot fall below zero.
+ RF killing OF soldiers (a small amount for each one, whoever or whatever killed them)
+ RF took a village peacefully via support
++ RF recently took a town (not village)
+++ RF recently took a city or the capital
+++ RF recently took a base, or won a battle over a town
--- A base or town lost back to the OF
- Over time (passive). Every 15 minutes a percentage of the current threat is shaved off, so it falls quickly when it is high and slowly when it is low. The percentage is a difficulty setting
Peacefully flipping a settlement is worth more the bigger it is: the gain scales with the settlement's size, so a village is the smallest gain and the capital the largest.
The OF's resource income every 6 hours is its base income plus an amount scaled by threat. That scaling caps out, so past a certain point more threat buys the OF nothing further, and the number of players online multiplies the result on top.
Resources are what the OF spends on garrisons, patrols, checkpoints and QRFs, so sustained threat is what turns the map hostile.