Assuming both are using OS X, an ethernet cord. Don't ask me how to do it, since I only have one Mac. You'd probably have to set up some sort of network and have file sharing turned on with both Macs.
You could also boot one of the Macs up in Target Disk Mode and connect it to the other via Firewire.
If you have a router, you could do file sharing over the network.