Boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens.
Select your boot volume if not already selected.
Select your username from the menu labeled Select the user account if not already selected.
Follow the prompts to reset the password.
Select ▹ Restart from the menu bar. You should now be able to log in with the new password, but you won't be able to unlock the Keychain. If you've forgotten the Keychain password (which is normally the same as your login password), there's no way to recover it.