In addition to building Walls and Towers, you train your citizens as warriors to defend your settlement. After the spare citizen has completed building of the barracks the citizen is removed from the settlement. Instead they become a dedicated soldier, creating a Warband garrisoned in the settlement. Afterwards they will march around the land, fighting your enemies and protecting your civilians.
Warriors are grouped into Warbands. Warbands move and fight together in formation.
As of 2.0, warbands are directly tied to barracks with them serving as the home base and upgrade route for them. Select 'Deploy' to bring the band out and send it wherever you want. Keep in mind that if you forget where they are or would rather not select them and manually move them back to base you can just select their barracks and click 'recall'.
Warbands can be ordered to move through the Move command. The Warband will then march in formation to the targeted point. As of 2.1, multiple warbands can be moved and generally commanded at once in a formation.
Warbands will automatically fight each other when they get close enough, and currently cannot be ordered to retreat. When fighting, the Warbands will square off against each other, and march forward until they either enter the range of any archers and skirmishers, or until they touch. Individual warriors will attack the nearest enemy in range, attacking according to their training.
Warriors will also attack hostile structures they encounter, but won't seek them out automatically. You can order a warband to attack a structure by ordering them to Move immediately adjacent to it.
There are multiple 'fighting' stances introduced to units in 2.0. This includes Aggressive(seek out enemys and fight them to the death), Defensive(wait until they attack first, then return fire), Skirmish(fight them where you see them but retain the ability to back off when needed), and passive(completely ignore enemy attacks and retain the ability to move when attacked). Keep in mind that the automatic stance for warbands is defensive and migrant groups are automatically set to passive (although do have the ability to fight; just very poorly).
When training warriors you can choose from a few different options. These have different costs in Resources and Time, and different combat effectiveness. Your first choice is between Militia and Skirmisher barracks. A nice rule of thumb is militia is a basic melee unit whereas skirmishers prefer to keep their range. Starting off, both will be extremely weak againsed Masklings and should only be used againsed 1 enemy warband unit, or in tandem with multiple other units. Lucky for us, with spare wood and copper, you can upgrade these Militia and Skirmishers to Spearmen and Archers, respectively.
When two hostile warriors touch, they immediately start fighting. Each warrior makes an attack, dealing Melee Damage to the target. For each point of damage there is a chance the target ignores it. Any damage not ignored by Armor is applied to the target. The attacker then spends 2 turns recovering before making another attack.
Warriors attacking structures is almost identical to Warriors attacking each other, except that structures don't have Armor.
Ranged combat is resolved similarly to melee combat, with the following exceptions. The target doesn't have to be touching the attacker, just within range. The damage is not applied instantly, but after the attack animation finishes. The attacker has to spend 4 turns recovering, not 2.
Warrior health is determined by their race. Humans can take 12 damage before they die, Masklings can only take 4 damage.