Thats a good question!
This is your situation if im not wrong:
(Router A)[10.10.10.1][Gig0/1]-----------[10.10.10.2][Gig0/1](Router B)
If you add another Router (Router C) to the equation, you end up with this:
(Router A)[10.10.10.1][Gig0/1]-----------[10.10.10.2][Gig0/1](Router B)[Gig0/2][10.20.20.1]---------(Router C)[Gig0/2][10.20.20.2]
Now lets add the servers:
(Server 1)[20.10.10.1][Gig0/2]----[Gig0/2][20.10.10.2](Router A)[10.10.10.1][Gig0/1]-----------[Gig0/1][10.10.10.2](Router B)[10.20.20.1][Gig0/2]---------[Gig0/2][10.20.20.2](Router C)[Gig0/1][30.10.10.2]-----[Gig0/1][30.10.10.1](Server 2)
If (Server 2) wants to send a packet to (Server 1) then (Router C) will have to know what to do with that. Routers have IP tables, which they populate with routing protocols (you can read more about them:RIP, OSPF, BGP.. others), in this case one of those protocols will be in charge of letting each router know which network is connected to who. In this example Router C will know that in orther to get to the 20.10.10.0/24 network it has to send that traffic to Router B and that is how Internet works! (basic example)
I hope I explained myself