Most of the people don’t know answer to this question. Many of them speculate GPS and yes it one one of them but there are many others. Users don’t really care about this problem but just care about using their phone and apps. Some of the ways a Smartphone can Revel your locations are:
3. Your Mobile Operator and much much more.
Professor Derek McAuley explains how phone companies pinpoint your location and handle the high volume of phone traffic.