The verification code for two-factor authentication will be send to your trusted Apple devices (Mac, iPhone, iPad, iPod touch) if you have those, or else to a trusted phone number, that you have provided as such for this Apple ID account. The notification on Apple devices will be a pop-up message about it, to be confirmed on one of them, then followed by the code itself on the confirmed device. The notification to a trusted phone number will typically be an SMS text message.
You can review your trusted devices and phone numbers for your Apple ID account on the web, at appleid.apple.com﹥Sign-In and Security﹥Account Security﹥…
If you have an Apple device, then you can request a new, fresh verification code at any time, from the device settings. Quite nice if it is taking too long for any reason.
Two-factor authentication for Apple ID - Apple Support
Get a verification code and sign in with two-factor authentication - Apple Support
Note that it works for one Apple ID, not in combination with borrowed devices, or secondary accounts.