The GPS system involves more than software, of course, there are around 30 active satellites in orbit around the earth that broadcast very accurate time and location signals. The software in the receiver (your GPS unit or phone) uses information from at least four satellites. Using the time information from a satellite, the receiver can determine how far away it is from that satellite, and the location of the satellite at the moment it transmitted the signal is also known. Combining the distance/location information from several satellites the GPS receiver can pinpoint its location.