Option-click on another creature to target it for attack. Your current target will be marked with a small target icon. Option-click on yourself to un-target a creature. You will attack the creature with which ever weapon you have armed. For the attack to be successful you must be within the range of the weapon you have armed.
How much damage you do during an attack is determined by the following:
How well you know the anatomy of your opponent.
Your currently armed weapon.
Your proficiency with your currently armed weapon.
The defensive capabilities of your opponent.
It is also common for weapons and armor to be damaged during combat. The condition of your weapons and armor is shown next to the item name in your inventory display. This value ranges from +0 to +10. Weapons that are in better condition will do more damage, and armor that is in better condition will offer you more protection. If any item drops below +0 then it is considered to be a total loss and it's deleted from your inventory.
Weapons and armor that have been damaged during combat can be repaired by choosing "Repair" from the "Action" menu (Command-R). You can only repair items that you have the skill to craft. You must have the appropriate tool to repair items, and you must be standing by a forge to repair metal items. Only non-magical items made with the blacksmithing and woodcrafting skills can be repaired.
How creatures attack you will depend on their natural attributes and skills. Attacks can be made with weapons, hand combat, magic, or poison.