Each round, combatants can choose to attack a single enemy (depending on its distance) or actively defend itself from all enemies (increasing its armor class by one for the duration of the round).
Attacks
When a combatant attacks, it automatically utilizes its most powerful weapon for the appropriate distance type. For example, a magic-user may possess both a sling and a staff, but if the hero is still considered a ranged combatant then he will automatically select his sling. If, however, the same magic-user were attacked at close range, he would automatically draw his staff and attack with that. Naturally, magical weapons are chosen over non-magical weapons (so if the same magic-user had a staff +1 as well, he would use that instead of his normal staff).
When attacking, a combatant rolls a 1d20 and adds appropriate strength (close combat) or dexterity (ranged combat) bonuses along with any magical bonuses that may exist. The combatant's goal is to roll a score equal to or higher than its opponent's armor class; if the roll is successful than the enemy is struck and damage is calculated (per the weapon type, strength/dexterity bonuses and other associated bonuses). Note that a roll of a 1 is always considered a miss regardless of all associated bonuses.
Defense
Combatants naturally protect themselves as much as possible. This is primary done through the use of armor, shields, magical rings and other forms of magic. Again, all things being equal, an enemy must roll the value of a defending character's armor class or higher on a 1d20 in order to successfully strike the character and cause bodily damage.
However, characters can also choose to actively defend themselves even more during combat. When the associated command is selected, the character spends the entire round doing everything in his power to evade attacks. This results in an additional bonus to the character's armor class and makes him slightly more difficult to hit but it also prohibits the character from doing anything else during the round.