The first thing that happens is a random number check against the higher of the girls combat or magic skill. If she has really low combat and magic skill then she won't encounter monsters or monster girls very often.
If she passes the check then the game generates a random number of monsters, monster girls, and loot. The girl then fights each of the monsters and monster girls in turn. Combat occurs by alternating blows between the two combatants. A girls ability to dodge attacks is based on her agility, her ability to do damage is based on the higher of combat or magic although combat will be used if they are equal, and her ability to withstand damage is based on constitution.
As far as calculating damage goes, in theory there is a function that calculates damage based on her abilities and is modified based on various traits (Adventurer, Assassin, etc) but as near as I can tell from looking at the code it's not currently used. Damage has a base value with a bonus added on based on how good she is at combat or magic, and then the defender negates some of that damage based on their constitution. The girl who's health reaches 0 first loses.
The only short circuit trait currently is Incorporeal. If a girl has Incorporeal she always wins, unless she is fighting another Incorporeal girl, in which case it is an automatic draw. Also, if she does not have Incorporeal but her opponent does then she automatically loses.
So, basically, the way the game is currently programmed, you want high Combat, Magic, Agility, and Constitution.