GoodOldBrow: (despite all the games I've picked up here, the rules seem to change from game to game).
There are two major rulesets which computer games tend to use when using DND rules. History incoming: DND has gone through various "editions" over time. The first system was just called "dungeons and dragons", and was shortly followed by the "advanced dungeons and dragons" (ADND) system which enlarged upon it in many ways. The ADND system proved much more popular than its predecessor, and - technically - every DND ruleset you're likely to encounter is an edition of ADND, although the "advanced" part was later dropped as basic DND was no longer relevant.
As ADND was more popular, after a while an updated system, (A)DND second edition, was released which tidied things up and made them easier to use. Instead of a table comparing different types of weapons to different types of armour to calculate hit chances, you just had stats called THAC0 and Armour Class. That kind of thing. 2e was the most up to date iteration when the first major CRPGs using DND rules came out, and to the best of my knowledge there are no 1e computer games, and certainly none on DND. Most of the Infinity Engine games use 2e.
Between the publications of Baldur's Gate 2 and Icewind Dale 2 third edition DND was released. The new system focussed on unifying the classes and simplifying things, so you could mix and match levels of different classes as you wanted. In many ways, 3e DND is different enough to be considered a separate system, though it has areas which aren't changed much (spellcasting is still done on a spellslots-per-day basis, etc). Not long after, an update was released which rebalanced and improved the game, and became known colloquially as "DND 3.5". It's similar enough to 3e that understanding one ruleset will mean you can easily understand the other, though. NWN and IWD2 use 3e; ToEE and NWN2 use 3.5.
Finally, the current system of DND is fourth edition. It's never been that popular, however, being considered by many to be "too MMO-like", although appropriately the MMO Neverwinter uses it.
Summary: There are two systems of DND which games use depending on publication date, and they are only moderately related. Check whether the game you're playing is using the second or third edition rules (in ToEE's case, it's using 3e, or more accurately the slight rebalances of 3.5e). In addition, each game tends to modify the rules in minor ways, either due to engine limitations or more mysterious decisions by the developers. However, if you know which edition each game you're playing is you'll find a lot more consistency between the games of each edition.