Keep your iCloud account secure with two-factor authenticationHow do you set up Apple's two-factor authentication, and how do you get verification codes? Here's what you need to know!
Two-factor authentication (2FA) is a secondary security measure that provides you with an access code for your Apple ID after you enter your username and password on a new device or into iCloud.com. Apple allows its customers to set up 2FA for their iCloud accounts, and get codes from a circle of trusted devices like their iPhone, iPad, or Mac. Bottom line: If you want something more than just your password to protect your Apple ID — which you use for iCloud, iTunes, and the App Store — then you want 2-factor authentication turned on.
Note: Apple originally implemented two-step verification, where you only need to enter in a code every so often; it's since switched to two-factor authentication, which requires a code every time you log in to an unrecognized device or website.
How to switch from Apple's two-step verification to two-factor authentication
How ...
Source:
Keep your iCloud account secure with two-factor authentication