The first thing to do is have an internet connection. Whether it is through a dial-up account, (A)DSL, Cable, or Ethernet it doesn't matter. Now, there are three ways to get your friends (or roommates) to share your connection. You can get multiple IP addresses, or use routing. Multiple IP addresses is only an option (and the easiest option) if you have an (A)DSL or Cable internet connection. If not then you will have to use routing, either hardware or software. The differences and ways to implement these options will be explained below.
Multiple IP addresses - This option is generally only available for (A)DSL and Cable internet users. Dial-up users aren't able to get extra IP addresses, and only a few ethernet users can get extra addresses. If your ISP offers multiple IP addresses then all you need is a hub, a network card per computer, and cable. Make sure to get a hub that has enough ports for each of the computers that will be getting on to the internet plus one for the modem. The speed of the hub won't matter for your internet connection since it probably is only 768Kbps which is about .75Mbps and hubs are 10Mbps or 100Mbps. So, a faster hub and network cards won't speed up your internet connection, but it might help if you are doing LAN games and file transfers with your friends that are on your hub.
Routing - Routing is a process of having one computer or device (the router) connected to the internet and connecting other computers or devices to that router. This can be done with a standalone (separate) device specifically called a router, or can be done with software.
Routing with hardware - Using a standalone hardware based router may be slightly harder to setup initially but does not require any single user to keep their system powered on all the time for the others to have internet access. First, the router will have a WAN (or modem) port and a LAN port. If your router has a hub or switch built-in then you can plug your computers into the ports, else you need to connect a hub. To connect a hub use a straight-through (regular/standard) network cable and plug it into the uplink port. Make sure both the router and the hub are powered-on, then check that both the router and hub show the appropriate LED's (the little lights) lit up for the ports that you have plugged the cable into. If the LED's are not lit up then look at the ports on the hub, and you should see either a button next to the uplink port or a line connecting this port with one next to it. Push the button, or switch to cable to the line-connected port. The LED's should now be lit. If not, read the manuals for what to do. Now, we have our connection to the internet setup, we need to connect the computers. Most routers require only one computer be connected to setup the router. You should follow the directions for setting up the router, once that is done, you can connect the rest of the computers.
Note: This setup requires only setting up the router one time. To make life as easy as possible you should enable DHCP service on the router. This allows each computer that you connect to request all the necessary settings for connecting to the internet from the router. This setup is great for security, because the only thing that someone else on the internet can see is the router. The router won't pass any strange connections (like hackers) onto your computers, since it doesn't know which computer it was meant for and therefore ignores it. This means that it shields you from people accessing your computer from the internet, it does NOT protect you from viruses that you download in files or in your email. It is strongly recommended that you install anti-virus software and keep it up to date. Most anti-virus software has updates through the web about once a WEEK! If the software has a warning about it being old, pay attention. Many people think just because they have the software they are protected, not true. You need to update it at least once a month and scan the whole hard drive about once a month. This will check all the files you previously downloaded for any viruses that the software may not have known about previously.
Routing with software - Routing with software is similar to the hardware solution except one of the computers replaces the standalone router. With this setup, you install the modem get your internet access up and running on one of the computers. Now, install a second network card into the computer. Watch out on the network settings since, you've probably installed two of the same type of network cards, and telling which settings go to which card can cause headaches. Typically, the second network card settings are the second card you installed. Connect the second network card into a hub that has at least as many ports as computers you are getting on the internet. The other computers will need only one network card and one cable to connect to the hub. Now, you need to install routing software on the first computer that has the two network cards. Try to avoid proxy software as there are more settings and headaches involved with this type of software. You can try Winroute or other software available at www.tucows.com or www.winfiles.com. Your TCP/IP settings for second network card should be as follows:
Troubleshooting - First make sure the first computer can access the internet with the routing software turned off or disabled. Next, enable the software and verify access, try another site or close the browser and reopen it to make sure it is not reloading a cached copy of the page. Now, on another computer open a MS-DOS or command prompt window, type 'ping 192.168.1.1' if the response was 'connection timed out' then your TCP/IP settings are incorrect. Else your setting in the routing software are probably incorrect, read the manual or help file for your software.
In conclusion, hardware-wise the options stack up as such: