To enable two-factor authentication, download a two-factor authenticator app like Microsoft Authenticator (for Windows Phone, Android or iOS) or Google Authenticator (for Android and iOS). Then go to Account Details from the profile drop-down menu. Click on Manage Logins and select Two-factor Authentication from the list on the left. Click on Add Authenticator App. Scan the QR code provided on the consequent page or input the key manually. The app will provide you with a verification code. Enter the code into the confirmation box on the page to finish setting up two-factor authentication.
If you want to change the authenticator app you are using, go back to the Two-factor Authentication webpage and click on Configure authenticator app. If you input the wrong confirmation code, click on Reset authenticator key on the Two-factor Authentication webpage.