See the following from Two-factor authentication for Apple ID - Apple Support
When you sign in with your Apple ID user name and password for the first time on a new device or the web, you'll receive a notification on your trusted devices that someone is trying to sign in with your Apple ID. The notification might include a map of the approximate location of the sign-in attempt. This location is based on the new device's IP address and might reflect the network that it's connected to, rather than the exact physical location. If you know that you're the person trying to sign in but don't recognize the location, you can still tap Allow and view the verification code. If you're not the one trying to sign in, tap Don't Allow to block the sign-in attempt.