Hello RubysGloom,
This page here can help out with the available ways to receive a verification code: Get a verification code and sign in with two-factor authentication - Apple Support
Note that to generate one from a device, the same Apple ID will need to have already been signed into it.
With regards to locating the device, this can be done from the iCloud.com website here: iCloud Find My iPhone
This will require knowing the Apple ID and password. If they're prompted for the verification code, and are unable to obtain via the means in the first link above, there should be an option below that references accessing Find My, which won't require the code. This may only appear on the iCloud.com/find link.
Cheers.