This only works for Snow Leopard.
1: Reboot the computer and hold the command and s keys down to enter single user mode.
You will need a wired/built in keyboard, a PC one will work, the Windows key is the commnad key.
(if a lock appears and a password request, there is a firmware password, you have to know it or take it to Apple to fix it)
2: When you get control, type fsck -fy and press enter, it will take a bit to finish
3: Next type mount -uw / (there is a space before and after -uw) this mounts the drive
4: Next type ls /Users this will list the Users on the machine so you can get the name
5: Next type passwd username (where username is the name of the account)
6: Enter the new password twice, you won't see anything.
7: Once inside, your going to have problems with Keychain.