You can get an rj45 crossover cable and connect the two together, provided they both have network adapters.
Setup the same workgroup on both computers and enable file sharing.
They also need to be using the same protocol (language).
They have to have unique computer names though - e.g comp1 and comp2.