It is checked against the database of “leaked” combinations.
Google has released the Password Checkup extension for Chrome, which tells the user if the password is safe. To do this, the extension checks it on the databases of 4 billion combinations that attackers already know about.
If the company becomes aware of a new leak, and the password is compromised, the user will be notified when they log into the account from any device. Google claims that the extension does not collect information about passwords, accounts, and devices, but “sends anonymous information about how often unsafe credentials are found, which domains they are associated with, and whether users change passwords when receiving notifications.”
Google is not the first company to launch such a service. Password Manager 1Password supported an extension that compared passwords with Have I Been Pwned. However, the Password Checkup extension is free and has a built-in secure password generator.