If you wish to change your password, you must first be IDENTIFIED to the nickname you want to change the password on, then you can use this command:
/msg NickServ SET PASSWORD <new password>
You DO NOT need to put in the OLD password, since you are IDENTIFIED at this point - simply use the command and put in your new password.
Example:
/msg NickServ SET PASSWORD 5tgh6y9k23