A trusted device is an iPhone, iPad, or iPod touch with iOS 9 or later, or a Mac with OS X El Capitan 10.11 or later that you’ve signed in to using two-factor authentication. If your device doesn't automatically display verification codes when you sign in with your Apple ID on another device or browser, it’s not trusted yet.
Check your devices
You can see if your device is trusted when you sign in to your Apple ID account page and check your device list. If your device isn't trusted yet, you'll see "To use two-factor authentication on this device, follow these instructions” in the detail view for that device.
Set up your devices
To trust a device, simply make sure that your iPhone, iPad, or iPod touch has iOS 9 or later and that your Mac has OS X El Capitan 10.11 or later. Then sign in to iCloud from your device Settings or System Preferences.
If you're already signed in to iCloud, tap or click your name to access your Apple ID account details. Enter your Apple ID password, then enter the six-digit verification code you get on your devices that are already trusted. Once you successfully sign in, your device is trusted.