Locating AirPods using "Find My iPhone"
How this feature works is detailed in the Apple Support document, If your AirPods are lost:


  With iOS 10.3 or later, Find My iPhone can help you locate your missing AirPods. If you already set up Find My iPhone with an iPhone, iPad, or iPod touch that you’re using with your AirPods, it's automatically enabled for your AirPods too. So if your AirPods are lost, out of their case, and somewhere close by, you can use Find My iPhone to find them again. If your AirPods are out of range of all of your devices, need to charge, or are in the AirPod Case, Find My iPhone can still help by showing the time and location where they were last connected.


So yes, your AirPods need to be in the Bluetooth range and connected to one of your devices for them to be found. If they are out of range, Find My iPhone shows the the time and location of last connection, helping you to drill down to potential location.



Basically this means


If the AirPods are within range of any your devices you see the location of that device
If the AirPods are out of range, you see the location of the most recently connected device, at the time of the last connection