It's not all that complicated really. Towers have unique IDs and known GPS coordinates. When your phone pings them it gets signal strength for each. So if you have 75% signal for tower 1, and 50% for tower 2, they can figure out where relative to those two GPS points (the towers) you'd have to be to have that combination of signal strength.
It's not all that complicated really. Towers have unique IDs and known GPS coordinates. When your phone pings them it gets signal strength for each. So if you have 75% signal for tower 1, and 50% for tower 2, they can figure out where relative to those two GPS points (the towers) you'd have to be to have that combination of signal strength.