Go to https://appleid.apple.com/
Sign in with your Apple ID
Select Security
Choose Password
Select Change Password
Enter your current password
Enter a new password
Re-enter the new password to confirm
Select Change...
Sign in to iCloud.com with your Apple ID: https://www.icloud.com/photos
Open the Photos app on your iPhone or iPad
Open the Photos app on your Mac
Enable iCloud...