How do routers get their external IP address? Is it assigned by a central service? Is it decided by the ISP? I have googled this problem, but have only found how to change my IP address, which is not what I am after.
Very much like how you have a local DHCP server running on your home router to serve IPv4 addresses on your LAN network (typically in the 192.168.1.x subnet), your ISP also has a DHCP server running somewhere that your router gets its WAN address from. The IP address range your ISP's DHCP server hands out are public IP addresses that it has purchased or been assigned.
There is no single answer to this save to say that ISP's provide IP addresses out of blocks they own. A non-exclusive way as to how they may be implementing this -
If the connection used PPPoE or PPPoA the PPP session will have an IP address associated with it. Very commonly these IP addresses will be configured in a Radius server (often backed by a database). The ultimate assignment could be based on userid, come from an IP pool or a characteristic associated with the connection.
In a simple ethernet case an IP address could be assigned statically or via DHCP - although this is not a great way to do things unless there are additional controls to prevent people "stealing" others IP addresses.
Have to agree with you, quite difficult to find a straight answer via google. To me that means it's a good question!
Reason why answering this question is difficult, like Davidgo mentioned, is because there is no single answer. What he probably means is that there is more than one single method or process that leads to assignment of an IP address to a machine. Which method or process is used depends on specific circumstances like e.g. is the router connected to the internet or is it connecting to a(-nother) private network.
Try to keep in mind that all methods, protocols, policies, processes etc. that are required to enable communication are part of a logical, systematic and strict set of rules (so a structure) to ensures unique identification for all connecting machines. If the uniqueness fails, then communication drops out and no networking is possible. So in that sense this full set of rules is the correct answer to your question but that's just a bit too much to take in at once.
Intro below (there is much much more on their site as I just found out.
IP addresses are managed by the Internet Assigned Numbers Authority (IANA), which has overall responsibility for the Internet Protocol (IP) address pool, and by the Regional Internet Registries (RIRs) to which IANA distributes large blocks of addresses.
The RIRs manage, distribute, and publicly register IP addresses and related Internet number resources, such as Autonomous System Numbers (ASN) and reverse Domain Name System (DNS ) delegations within their respective regions.
They do this according to policies which are developed within their respective regional communities, through open and bottom-up processes.
Routers get their addresses the same way any other device does, which is to say: it depends. It might be DHCP (very common in cable and fiber scenarios). It might be IPCP as part of a PPPoE session (common for DSL and some other fiber providers). It might simply be statically assigned and manually configured (common within network providers themselves and for particularly large customers). It might be something completely different. There's no one definitive answer on Google because there's no one definitive answer.