The actual resolution of combat wholly depends on the weapons mounted on your mech. If the enemy is in range, you will be able to engage the enemy. Doing so brings up the attack overlay, showing the current status of the target (mech/vehicle/turret/gardener). The lower right-hand display will show the chance to hit (next to the ammo and weapon damage display), while the mech's status bar will show the projected heat gain. You can choose to deactivate the weapons to tailor the attack to the situation and conserve heat or ammunition.
Accuracy is determined by the game depending on a variety of factors, including:
The Mechwarrior's Gunnery skill (+5% per point). Attacker's class (-10% to hit for Light mechs, 0 for Mediums, +10% for Heavies, and +20% for Assaults). ¿Sure? Is not the target's class what matters? Elevation (10% per 15 units; the higher, the better, the lower, the worse; at present, you can only receive a +10% bonus).