the easiest is to buy a lenght or cat5 with rj45 jacks on, 2 NIC's (Network installation Cards) and little crossover switch. All these can be picked up for next to nothing.
Once you have the two network cards in your machines plug the cable is as follows
Then run the network configuration wizard on both PCs and you should be good to go.
This method has some serious flaws though.
1. In my experience swapping files between machines can be a bit hit & miss
2. Both PC's must be turned on for the second PC to access the net!
The best setup (but not the cheapest) would be as follows:
By using a router (not a hub) you only need to have the PC you are using switched on the browse the net. Also the router acts as an addition firewall (know as a hardware firewall)
This is the best option, particualrly if you ever want to introduce a 3rd PC
Another option, if you have a large distance between the pc is to use wireless! I havn't used woreless personally but people who have reat it quite highly
Read more about it here: click here