the same thing the CPU in a PC does, it runs the OS (yes the router has an OS) and does the processing. allows the router to track the packets from the internet and like a traffic cop says what packet goes to what address and when for all nodes (devices with an IP address) on the network.
the server that converts google.com to its IP address is the Domain Name Server (DNS). it is not in the router but the router relies on it for the translation and connection to sites.
the more users on the network the smarter (faster CPU) the router needs to be.
the routers CPU not only does all the work for the internet routing and DNS communications but also tracks all the data on the private network be that home or other.