“To hit” adds to your chance of hitting a monster. To be slightly more specific your chance of hitting is:
number of dice = 1 + int(dex_cur / 2) + skillLevel(“melee”) + weapon.type->m_to_hit
sides = 10 - encumb(bp_torso);
This is then compared against the monsters dodge roll (# of dice = dodge modified by size, sides/status, # of sides = 10). You also have a flat one_in(4 + dex_cur + weapon.type->m_to_hit) chance to miss as well.
The stat also shows up in a few other, lesser, places as well (such as determining crit chance), but those are the main two.