2FA, or two-factor authentication, is an extra layer of security used to protect online accounts. In addition to a password, users are also required to enter a code that is sent to their mobile device. This makes it more difficult for hackers to gain access to an account, as they would need to have both the password and the code.