Verify that you need a null modem cable. A null modem cable is used to connect two independent computers together. Locate the serial (RS232) port on each computer. It is a safe bet that if they are both male connectors, you need a null modem cable. If one of the ports has a female connector, either it is already set up to receive data, or you are looking at the wrong port (for example, a parallel printer port).
Determine what kind of plugs you will need. There are 9-pin serial ports and there are 25-pin serial ports. Both kinds work equally well. You may be making a 25-to-25 cable, a 25-to-9 cable, or a 9-to-9 cable.
Purchase some multi-conductor cable with at least seven conductors, and the appropriate female DB9 and/or DB25 connectors. Ethernet cable is readily available and works fine.
Refer to the table below for pin assignments. For example, if you are making a 9-to-9 cable, wire one plug according to the leftmost column, and the other plug according to the rightmost column. If you are making a 9-to-25 cable, wire the 9-pin plug according to the leftmost column, and the 25-pin plug according to the second column from the right.
If you are making a straight extension cable (not a null modem cable), just stay on the same side of the table. For example, to make a 9-to-25 straight cable, wire the 9-pin plug according to the leftmost column, and the 25-pin plug according to the second column from the left.
Fill in the wire color column for your own reference.