I erased my HD and am trying to re-install Mac OS X Lion. I forgot which Apple ID account and password I used. How can I re-install OS X Lion then? And what is a "keychain password"?
You first need to go to iforgot.apple.com and click Forgot your Apple ID?. This will let you recover both ID and password.
Now, proceed with the installation.
You should also be able to install OS X without an Apple ID and set it up later.
The Keychain password typically is your user account password. The one you've been using on the Mac before to log in. Your Mac has prompted you for this password whenever you wanted to install software that came with an installation assistant, or in order to save credentials for websites in Safari, Mail account passwords, etc.
Those passwords are stored in the "login" Keychain, which is the default on every system.
You can find out what the Keychain stored by opening Keychain Access.app, or examining the file
Newer models will allow you to boot from an internet netboot and reinstall without a recovery partition. You shouldn't need an Apple ID for internet recovery. Older models (2010/2011) have a firmware update which enables internet recovery as well.
When using recovery, if Apple detects that the version you're trying to install a version that didn't ship with the computer, that's when it asks you to login with Apple ID
If you want to bypass this then you'll need a copy of the installer and create bootable USB drive via the InstallESD.dmg method.
The keychain is OSX's way of saving all your passwords