There is the Public Switched Telephone Network (PSTN) that connects calls between wired (fixed line) and wireless telephony subscribers (GSM is just the 2nd generation wireless telephony system, and there are others). Unlike packet-switched networks like the Internet, the PSTN is circuit-switched. For purposes of call routing, there are three pieces of the circuit to consider:
(a) the call leg between the caller and telephony switch on the caller side
(b) the call legs between the telephony switch on the caller side and the telephony switch on the callee side
(c) the call leg between the telephony switch on the callee side and the callee
Between switches, Signaling System 7 (SS7) signaling would be used. One of the differences between fixed and wireless (e.g., GSM) networks is that the wireless cellular networks would have a Mobile Switch Center (MSC) that is analogous to a telephony switch (see class 4 telephone switch, for example), but with the addition of mobility-related functions. So you could have wireless-to-wireless, wireless-to-wired, wired-to-wireless, or wired-to-wired calls, with SS7 signaling between the telephony switches (including MSCs) to set up the voice circuits.
What mobility-related functions would an MSC need to support? You asked how phone calls are routed. Let's consider the example of an incoming call to a wireless cellular phone. Based on the digits of the phone number (including country code, area code, etc.), the switch or MSC on the calling side is about to identify the home MSC of the callee (I say "home MSC" because the networks support roaming also, where the phone is at another network served by a different MSC, but based on the phone number, their home MSC that is in their home network is identified). In GSM, the home MSC would query the Home Location Register (HLR) to check where the phone was last located. It may be somewhere in the home network or roaming.
The non-roaming case is more straightforward, which is to just establish the last-mile call leg to the mobile phone through the home GSM network (from MSC to Base Station Controller, BSC, to Base Transceiver Subsystem, BTS, or base station for short, and then over the air to the mobile phone). In the roaming case, the HLR would know the network the phone is roaming in, because the phone would have completed a registration procedure in that network. So the HLR would point to a Visitor Location Register (VLR) in that other network. SS7 signaling from the home MSC to that VLR retrieves a special routing number to the MSC in the roaming network, so that a circuit can be established between the home MSC and that MSC. Once that call leg gets set up, then the MSC in the roaming network would need to establish the final leg to the base station and on to the phone.
There are additional details, like location updates so the network knows where the phone is, roughly (not too precise), even when it is idle. Then to deliver the call, the MSC may need to arrange for paging of the phone over a number of base stations in a Location Area, as it doesn't know which base station exactly, the phone is camping on or using at that time.
So anyway, it is a very different network from packet switching networks like the Internet.
There have been all kinds of convergence and integration going on in the networks the past few decades, though, so one may find some packet switching used internally even within networks that are part of the PSTN these days. LTE, a successor of GSM, does not even natively support voice/telephony and Voice-over-LTE (VoLTE) uses a form of VoIP with the IP Multimedia Subsystem (IMS) of the core network handling call control signaling.