Icloud email password say example1@gmail.com is not signed in Mac / iPhone / iPad it will be treated as web mail address , however you had used to sign in Mac / iPhone / iPad previously , but changed it from appleid.apple.com and set up a new mail address it could be example2@icloud.com or with some other web mail address used with yahoo , hotmail ....
Change the password from web account , it depends which web mail account was used .
For gmail accounts see the article https://support.google.com/accounts/answer/41078?co=GENIE.Platform%3DDesktop&hl=en
To secure the account https://support.google.com/accounts/answer/46526?hl=en
To change iCloud mail password see the articles Change your Apple ID password - Apple Support
What to do after you change your Apple ID or password - Apple Support