The easiest way to connect just two computers to each other but to nothing else, is to buy a crossover cable. It looks the same as any normal network cable; the difference is inside, two wires are crossed so that they work as out to in and in to out, so I suggest labeling it before putting it away if this is just temporary to transfer some files. You still have to buy something but this cable should be cheaper than a switch.
Microsoft explains networking it
HERE.
* OR *
If they are connected to the same router as all the other computers and you just want to limit their internet connectivity, it can be done via the group policy editor. I haven't read through it all but I believe this
Microsoft Technet can help. Of course the userids set up on those computers cannot be Admins or they could simply change the policy and reboot to start the Internet Connection Services.