If you attack someone, the game uses a number of things to decide what the outcome will be.
Type of attack:
Each unit has a type of attack, here they are:
Normal/general: Spear fighter Swordsman Axefighter
Archer Archer Mounted archer
Cavalry Light cavalry Heavy Cavalry