Attacks and Defenses are calculated according to the Formula:
Success Attacker = Attack Value [Attacker] / (AttackValue [Attacker] + Defense Value [Defender])
Therefore if for example a Warrior (Attack: 1) attacks a Spearman (Defense = 2)
its Chance to score a Hit is 1/3 for every Turn of the Combat.
A Cavalry Unit however would have a Chance of 6 / 8 ( --> 3/4) to score a hit against the same Spearman.
If the Attacker loses a Combat-Turn, he loses a Hitpoint, if the Attacker wins a Combat-Turn, the Defender loses one Hitpoint.
Combat-Turns are resolved until one Unit has 0 Hitpoints (at least in Close Combat).
Thats all about it.