To change the password you must be logged in to a shell. Assuming you're using the default username and password, open a shell and type:
For more information see How to log in to your Raspberry Pi via SSH.
Now that you're logged in, you can simply type passwd to change the password for the current user.
Now you'll be prompted to enter the current password, the new password, and then retype the new password. After you follow these instructions, you're password will be changed.