Right-click on the Steam icon in the System Tray and select Settings or press the Settings button in Steam's Steam menu.
Click the Change password or secret question... button.
Select either:
I want to change my password, or
I want to change my secret question.
and click Next.
Enter your old password to authorize the change, then:
To change your password, enter your new password twice.
To change your secret question, select a question from the list and enter your answer in the bottom text box.
Note: Answers to secret questions are case-sensitive and must be spelled exactly as you enter it here.
and click Next.
View the confirmation page and make sure all of the details are correct.