You need ethernet transceivers which plug into the back of the mac and allow you to connect rj45 cables to the mac.
If you are only using 2 macs, you can use a crossover cable to connect them. This can act kind of quirky however, so I strongly suggest you get a small hub. These aren't very expensive.