Step 1. Open the Apple ID site on the web.
Step 2. Log in with your Apple ID.
Step 3. On the trusted device, you'll be informed, please tap on "Allow".
Step 4. Type in the 6-digit code you received on the trusted device.
Step 5. Scroll down to "Security" section and click "Edit" option on the right.
Step 6. Select "Turn Off Two-Factor Authentication" and confirm again.
Step 7. You have to answer security questions to identify yourself. When done, click "Continue" to go on.
Step 8. After confirming your birthday information and recovery mail, the feature will be turned off.
Now, Two-Factor Authentication is off and you can access your Apple ID freely.