This code can be found in the contact info screen, both as a QR code and a 60-digit number. These codes are unique to each chat and can be compared between people in each chat to verify that the messages you send to the chat are end-to-end encrypted.
Security codes are just visible versions of the special key shared between you – and don’t worry, it’s not the actual key itself, that’s always kept secret.
At times, the security codes used in end-to-end encryption might change. This can happen because you or your contact reinstalled WhatsApp or changed phones.
WABetaInfo tweeted :-
WhatsApp is planning to send notifications about security code changes when the user re-registers the account on a new phone.
There won't be notifications when people add/remove linked devices (multi-device): so we won't receive a lot of security notifications like this chat ⬇️
To receive notifications when security codes change:
Open WhatsApp Settings.
Tap Account > Security.
From here, you can enable security notifications by tapping Show Security Notifications.
This feature is only available for a contact in an end-to-end encrypted chat.