I could write a book I suppose? 😂
In the mean time:
This is how root servers work in DNS:
https://en.wikipedia.org/wiki/Root_name_server
Here is an example of a typical DNS zone file that would be stored on your or your ISP's DNS server
AS Numbers are described here:
https://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29
BGP routing is how the Internet decides how to route the majority of traffic.