A router can be used to connect two networks. In this usage there is one router at each network interface that links all devices beneath it to the router and the router interfaces to the link between the two networks.
It can also be a single interface to the Internet. In this example the Internet is the link to the "other network" (where the "other network" is pretty big).
Now let's assume you have 2 separate buildings, building A and building B on your property and separated by a short distance. Building A has an internet feed and its own network, Building B does not have internet feed or a network but you want a network in Building B and have it link to Building A so users at Building A can interface with and exchange data with Building B people. Although you did not address internet access for Building B people, let's assume you want this too.
Let's assume and define further:
Building A
Router A-1 - interfaces with Internet (DSL or CATV for our example). This unit provides all Building A users IP addresses using the 192.168.1.0/24 subnet with router LAN IP address of 192.168.1.1 and DHCP range set as 192.168.1.50 - 192.168.1.150 and all IP addresses above 192.168.1.150 reserved for static LAN devices (e.g. print servers, static pcs, etc). Being a 24 bit subnet, the mask is 255.255.255.0. Router 1 interfaces with Internet and is configured to receive its public IP address dynamically as the ISP provides a dynamic IP address (it could be static for our example's purpose).
We will run a CAT5 cable between Building A and Building B, calling it the "link line" to give it a name.
We will install a second router in Building A and call it Router A-2. Router A-2 will have a static private IP address of 192.168.1.2, subnet 255.255.255.0, gateway 192.168.1.1 and this connects to the network switch in Building A. We will assign the WAN port of router A-2 a static IP address of 10.10.10.9, subnet 255.255.255.248 (29 bit), gateway 10.10.10.9. This connects to the link line in Building A.
Building B
We have one router called Router B-1. Its WAN port is assigned static IP 10.10.10.10, subnet 255.255.255.248, gateway 10.10.10.9 and it connects to Link Line. The LAN side of router B-1 uses the 192.168.2.0/24 subnet; is assigned LAN IP 192.168.2.1, subnet 255.255.255.0; and it assigns IP addresses via DHCP to Building B users in the 192.168.2.50-150 range. As in Building B, router B-1 LAN port connects to Building B network switch as does all other Building B pcs and other LAN devices.
Now before we address routing tables, Building B pcs should receive IP addresses from Router B-1 on subnet 192.168.2.0/24 and should ping each other. Building B units should not yet see building A pcs, ping them or see Ineternet. Building A pcs should not see Building B pcs or ping them but should see and ping Internet and other Building A pcs.
The last part is to link Building B and Building A. Because this is such a small and easy to maintain link over just one link line, I would create a route table on Router A-2 and B-1 to route traffic between the two (you need routers that can set up route tables). You can also use automatic routing table protocols (e.g. RIP1, RIP2, BGB, etc) but these consume a lot of bandwith that is not really needed in this simple example so I probably would not do this. Once this works Bldg B pcs can ping and access pcs in Building A and Internet and Bldg A can ping and access pcs in Building B and internet.
Finally I would not use the low end home grade routers for this. They would rapidly be overworked and failures could easily arise. Spend more for better quality routers. I would check Cisco, Adtran, or 3Com for their products - as they are a lot better quality. Adtran's customer support is extremely good, better than the others, and most helpful if you get stuck.
I realize the above is a lot of work to set up but that is what it takes.