Two-Factor Authentication is a second step security measure when logging into Discord. It is not required, but recommended for safety purposes.
Download an authenticator app (such as Authy or Google Authenticator) and open Discord. Once on Discord, go to your user settings and click on 'Enable Two-Factor Auth' under the 'My Account' tab. Once the pop-up appears, scan the QR code or enter the 2FA Key into your authentication app. The authentication app should begin to generate 6 digit codes. Enter a code onto Discord where prompted and click on 'Active'.
When logging into Discord when 2FA is enabled, you will be required to enter an authentication code after you enter your password (this is not a substitute).
NOTE: Discord Support cannot disable 2FA from your account, only you can. If you do not have a backup code and you lock yourself out of your account, you are most likely unable to recover it.
In case you are unable to generate a code, Discord provides you with backup codes. You may grab your backup codes at anytime you are logged in by clicking on 'View Backup Codes' under the 'My Account' tab in user settings. Do not share these backup codes with anyone. We also recommend that you save these backup codes in a safe place in case you get locked out of your authentication app. Each Backup code only works once.
To disable two-factor authentication, click 'Remove 2FA' under the 'My Account' tab in user settings. You must be logged into Discord to do this.
If you are the Server Owner, you can enable Server Two-Factor Authentication which requires staff to have two-factor authentication enabled on their account to do "dangerous administrative actions". To enable this, click on 'Enable 2FA Requirement' under the 'Moderation' tab in server settings. You will be required to enter a 6 digit code to do this.