What is the iCloud security code?

I don't remember setting this up, what is the iCloud security code?
If you're referring to 2 factor authentication code, it's the one that appears on your trusted devices.
http://www.imore.com/two-step-authentication

If not, than it's your password. Use the following link if you don't remember it anymore.
https://iforgot.apple.com
The iCloud security code is the code you use to open your device. It's usually a 4 or 6 digit code. If you forgot it, or need to set one up, here's help.
Forgot Passcode
https://support.apple.com/en-ca/HT204306
This site will help you if you've entered it too many times incorrectly:

https://support.apple.com/en-us/HT202755

The iCloud security code protects your iCloud Keychain from being used on unauthorized devices. It's a good thing, so make sure you get it set up correctly where you can remember it moving forward.

Original thread: https://forums.imore.com/threads/what-is-the-icloud-security-code.387397/