How does two-factor authentication (2FA) for Login work?

Updated