 Your GPS receiver or your app on your phone is receiving very accurate and precise timed signals from spacecraft orbiting the Earth. Even though those signals travel at the speed of light, there is a delay before they reach the receiver on Earth, a receiver such as your phone. And it's that delay that allows the receiver to know how far you are from the satellite.