If you want to connect two computers directly without the use of a router, you can use a crossover cable. It is specifically designed for such an operation. A regular CAT5 cable would not be able to give you that kind of connectivity without the use of a router. In addition, both computers need to have a Network Interface Card (NIC) connected to them so that the crossover cable can be connected to them. This type of connection saves you from having to buy a router just to connect the machines to transfer files and share printers and media.
The crossover cable can also be used from a router to the computer. So do not think that it is only to be used for direct PC-to-PC connections. The internet can also be shared with the crossover cable. Simply allow you internet connection to be shared among any computer that is connected to the one with the connection and you are good to go. So save yourself some money and use a crossover cable if all you want to do is network two computers.