OD&D, AD&D1, [UA], B/ED&D, AD&D2, [S&P], D&D3.x
What mechanics (dice, charts, bonuses, etc.) are used to perform these actions in the various editions of
Dungeons & Dragons:
Attack an enemy.
Moldvay D&D: roll d20, add strength "to hit modifier", add spell bonus. Compare to value given in Combat Matrix, crossreferencing Hit Dice or Class/Level with enemy AC.
AD&D: roll d20, add strength "to hit" modifier (PHB), add weapon vs. armour type modifier (Weapon table), add weapon bonus (Magic weapon rules, DMG), add various spell bonuses (PHB spell appendix). Compare to Combat Matrix (DMG), crossreferencing Hit Dice or Class/Level with enemy AC.
AD&D 2E: roll d20, add strength "to hit", add weapon specialisation modifiers, add weapon modifiers, add spell modifiers. Compare to THAC0 (PHB) less enemy AC.
D&D 3E: roll d20, add strength "to hit", feat modifiers, weapon modifiers, spell modifiers, base attack bonus. Compare to monster AC.
Deal damage with a battleaxe.
Moldvay D&D: roll d6, add strength bonus, add weapon magic bonus. OR look up value for battleaxe in table (d8), add strength bonus, add weapon magic bonus.
AD&D: find weapon damage by monster size (PHB), roll appropriate die with Strength modifiers.
AD&D 2E: as AD&D, with specialisation modifiers.
AD&D 3E: find weapon damage by weapon size (PHB), roll appropriate die with weapon and feat modifiers.
Swim across a lake.
Moldvay D&D, AD&D: DM makes something up.
AD&D 2E: Makes a Swim proficiency check, modified by DM's judgement.
AD&D 3E: Make Swim skill check, DC based on DM's judgement and guidelines.
Hold one's breath.
Moldvay D&D: DM makes something up.
AD&D: DM makes something up.
AD&D 2E: I forget the rules; based on Con score, IIRC.
3E: As AD&D 2E. Fortitude saves to keep holding breath.
Climb a wall.
Moldvay D&D: Thieves roll d% on their thief skill table. Others: DM makes something up.
AD&D: Thieves roll d% on their thief skill table, modified by Dex and Race. Others: DM makes something up.
AD&D 2E: Thieves roll d% on their thief skill table. Others: DM invents something modified by proficiency system.
AD&D 3E: All classes roll d20 + skill bonus vs. a DC the DM sets.
Open a lock.
See Climb a Wall.
Find a secret door.
Moldvay: 1 in 6 chance on d6 for most classes, 2 in 6 chance for elves.
AD&D: as Moldvay.
AD&D 2E: as Moldvay
AD&D 3E: DC 20+ Search check for all classes; elves have bonuses and may detect just by walking past (they could only find Concealed doors in such a manner in AD&D and 2E).
Hear an approaching enemy.
Moldvay D&D: based on Surprise check: 1-2 on d6 is surprise. Thieves may Hear Noise if they are actively concentration. (So can other classes at reduced chances).
AD&D: as Moldvay.
AD&D 2E: as Moldvay, though Surprise check is 1-3 on d10.
D&D 3E: Listen check, with DC determined by DM.
Die
Too many ways.
Normally, hit points reach 0. Optional rule in 1E and 2E is at -10; core rule in 3E for -10.
I probably need to double-check my answers once I get home - this is off the top of my head.
Cheers!