Two-step verification helps protect you by making it more difficult for someone else to sign into your Microsoft account. It uses two different forms of identity: your password, and a contact method such as SMS or an email.
If you turn on two-step verification, you’ll get a security code to your email, phone, or authenticator app every time you sign in on a device that isn’t trusted (a new device).