A router connects you to the internet (username and password), provides a firewall, and has a switch built into it.
A switch is used to split 1 connection to many. A switch will most commonly be plugged into a router to split the router into more connections possible. A Switch is better than a hub because it sends only packets which are for a specific computer. While a hub just blasts all the packets to all the computers and hopes it works..