Two-factor authentication (2FA) prevents hackers from gaining access to your accounts even if they have your password. Here are the best practices for using 2FA.