If it is active two-factor authentication can't be turned off, with the exception being that if you have recently activated it you have two weeks to turn it off. See Two-factor authentication for Apple ID:
If you already use two-factor authentication, you can no longer turn it off. Certain features in the latest versions of iOS and macOS require this extra level of security, which is designed to protect your information. If you recently updated your account, you can unenroll within two weeks of enrollment. Just open your enrollment confirmation email and click the link to return to your previous security settings. Keep in mind, this makes your account less secure and means that you can't use features that require higher security.