Sorry to say, but Google has not open-sourced this part of the code.
You can see LocationManagerService - it talks to a remote service using a LocationProviderProxy. The implementation is in a NetworkLocation.apk in pre KitKat distributions and shipped by Google on every Android phone. (In KitKat it is in Google Play)
Relevant package name for KitKat :
private static final String NETWORK_LOCATION_SERVICE_ACTION =
"com.android.location.service.v3.NetworkLocationProvider";
Google uses WiFi positioning data + Cell ID information for triangulation.
I think you want to know how cell ID position occurs - there are many positioning protocols that have evolved from 2G to WCDMA to LTE. I think you will find this Spirent white paper interesting - An overview of Hybrid Location technologies