In Which Operating system you forgot the password, the password that you forgot is the administrator password or normal user account password?
If that is a administrator password then you cannot recover it. you should have created a password recover disk to recover you password.
Check the below link may help you
To create a password recovery disk