Every time you open Messages in a new browser or after signing back in, you'll be asked to confirm your password once — that's what unlocks your key on that device. It's used only in your browser to do this; it isn't sent anywhere new.
Changing your password in Settings re-locks your key with the new password automatically, in the same step — your message history stays exactly as readable as it was before.