Well, it's actually pretty cool - your iPhone uses a combination of GPS, Wi-Fi, and cellular data to determine its location. It's like your phone is sending out a secret signal that says "Hey, I'm over here!" and the Find My iPhone feature can pick up on that signal to show you where your phone is on a map. Isn't that like something out of a spy movie?
But, what if you're not connected to the internet, or you're in a area with no cell service? Don't worry, Apple's got you covered - your iPhone can also use Bluetooth Low Energy to send out a signal that can be picked up by other Apple devices. It's like your phone is saying "Hey, can you help me out and send my location to my owner?" and other devices can respond with "Sure thing, buddy!".