Ok, so what is a router? Well, on the absolutely most basic level, the router splits your internet signal so that multiple computers can share one internet connection. Now before I proceed further into what a router does and how, I would like to explain how a router splits an internet connection.
A cable splitter creates a copy of the cable signal. Imagine a pie. Each TV connected to a splitter gets a whole "copy" of the pie. A router, on the other hand, can't make multiple pies. It only has one pie, so it has to split it up into pieces to share between the computers. If one computer is downloading some huge files, it means the router doesn't have as much pie (or bandwidth) to share between the other computers.
The next order of business is how a router functions. Before I get started with this, I have to explain what an IP address is. An IP address is just like your street address. All mail that goes between your house and the world goes through your mailbox. All information between the internet and your computer goes through your modem. A router splits the "mail" between all the appropriate computers. For example, two people are browsing the internet. One visits www.google.com and another visits http://summerbreak05.blogspot.com. The router sends those URLs to the modem, which then sends them into the internet. The two webpages send information back to the modem. The modem sends the information to the router, which makes sure the right computer gets the webpage it requested.
So that is how routers/modems work at the most basic level. So what ELSE does a router do? Because all information between your computers at home and the internet goes through your router, your router provides a way to manage your internet connection and add protection via firewall. Almost all routers have a built in firewall which protects all computers connected to the router. Now the question is what is a firewall and how does it work? Your home network (all computers connected to a router) is like a small community. Without a router (and pretending your comptuers have no anti-virus or other protecting software), your community can send anything out of the community and anything can get in. A router is like building a castle around this community. So how does information get in and out with a giant castle built around your village? The answer is ports. Remember in the movies how castles have holes in the wall that can be opened and closed to allow archers to fire out? That is similar to a router. It operates all these holes (or ports) in your firewall.
For example, did you know that all website traffic goes through port 80? By default, routers leave the important ports open, like port 80. A lot of routers also allow you to open and close these ports. Have you ever had a program that went really slowly or not at all when connected to the internet? Likely, your router was blocking the port that the program was trying to use. It would be like trying to get in/out through the strongest part of a castle wall. You can open these ports, and your program will work fine, however, you can block ports to prevent computers on your network from using limewire or other programs you don't want to be used on your home network.
So routers have two basic functions. Split the internet signal and protect your computers. I would like to revisit one topic I mentioned earlier. The IP address. Imagine IP addresses are phone numbers. You have a global telephone number. Lets imagine mine is (111) 111-1111. This is the equivalent of your modem's IP address. But routers keep track of the computers by giving them all IP addresses. Think about it like this. If your trying to call someone in your community, you don't add the area code. But calling to Hawaii, you better have that area code on there. Your router gives each computer a "local" IP address, which makes sure the router sends the right information to the right computer. However, your modem is the one making the long distance calls and actually getting the right information from the webpages.
Anyway, that's all for now. Ask me questions in the comments and I will do my best to clear up any issues and hopefully make another networking post soon. Hope you guys like it!