If you haven't upgraded your Apple ID from Apple's older Two-Step Verification system to the more secure Two-Factor Authentication, iOS 11 and macOS High Sierra will do that for your when you install either operating system on your devices.
Apple communicated the change in an email to customers with Two-Step Verification enabled for their Apple ID. Here's the full text of the email communique, as obtained by MacRumors:
If you install the iOS 11 or macOS High Sierra public betas this summer and meet the basic requirements, your Apple ID will be automatically updated to use two-factor authentication. This is our most advanced, easy-to-use account security, and it's required to use some of the latest features of iOS, macOS, and iCloud.
Once updated, you'll get the same extra layer of security you enjoy with two-step verification today, but with an even better user experience. Verification codes will be displayed on your trusted devices automatically whenever you sign in, and you will no longer need to keep a printed recovery key to make sure you can reset a forgotten password.
Significantly improving the security of your Apple ID, Two-Factor Authentication requires both your Apple ID password and a one-time code when you sign in to a new device or browser with your Apple ID.
TUTORIAL: How to protect your Apple ID with Two-Factor Authentication
Unlike Two-Step Verification, which sends a six-digit verification code via SMS, Two-Factor Authentication is deeply integrated in iOS 9, OS X El Capitan, watchOS 2 and tvOS or later and features a mechanism that automatically delivers verification codes via push notifications to all trusted devices registered to a given Apple ID.
If you're not using either system to protect your Apple ID, you're wholeheartedly recommended to enroll your devices in Two-Factor Authentication. If your account isn't eligible for two-factor authentication, you can still use two-step verification to protect your Apple ID information.
One way or another, anyone installing Apple's latest OS updates this fall shall be asked to upgrade their Apple ID to the more modern Two-Factor Authentication system. Two-Factor Authentication is available in more than a hundred countries, listed in Apple's support document.