How to Use two-factor authentication
On a Mac (no 2SV)
Go to the iCloud pane in System Preferences. Click Account Details, then click Turn on Two-Factor Authentication. If you created your Apple ID in iOS 10.3 or macOS 10.12.4 or later, this feature will already be on.
On a Mac (with 2SV)
In Safari, go to appleid.apple.com and sign in. Click Edit in the Security section and click Turn off Two-Step verification. Create new security questions and type in your date of birth. Now follow step 1 to turn on 2FA.
On iOS 10.3 or later
In Settings, tap your name at the top of the first page, then Password & Security. Tap Turn on Two-Factor Authentication and then Continue. Two-factor authentication will now be turned on for your iCloud account and supported devices.
On iOS 10.2 or earlier
In Settings > iCloud, tap your Apple ID followed by Password & Security. Tap turn on Two-Factor Authentication followed by Continue. You may be asked to answer your Apple ID security questions to proceed further with this.
Add your cell number
On the next page, choose your country then type in the number of the cell you want to use. Choose either text message or phone call to receive the verification code. When you get the code, type it into the boxes on screen.
Update your number
In Password & Security settings, tap Edit. Tap the minus to remove a number, or Add a Trusted Phone Number to add one. Verify using text message or an automated phone call, then enter the code you receive.
Manage trusted devices
Sign in to appleid.apple.com; enter the verification code when you receive it. Scroll to your devices. To remove one, click on it, then Remove, then Confirm. New devices are added here when you sign in to iCloud on them.
App-specific passwords allow thirdparty apps to access your iCloud data. Next to Security at appleid.apple.com, click Generate Password. Follow the steps and type the result in place of your usual password in the app.