Restart your computer & then press F8 hence you entered into the Safe mode, after that you will be able to login through administrator .Then go on my computer & right click go on manage >local users and groups>users, select your account & change your password.
For XP Pro, that will work. Doesn't work in XP Home.
XP Home users:
Reboot your computer and keep tapping F8 before you see the XP Boot screen.
Use arrow keys to choose Safe Mode.
Log on with the in-built administrator account.
Click on Start, Run and type in
control userpasswords2.
Click on the account you want to change and click on
"Reset password...".
Choose a new password.
Click OK, and click OK again.
Reboot into Normal mode.