Depending on what OS you are using, it is possible to network two computers with modems and nothing else, but it is not trivial, not very user friendly (connection setup is completely manual and drops every time one of the computers is rebooted) and it is VERY slow.
Basically, you need to set the two machines up for a PPP connection. Contrary to popular belief, PPP is actually a peer-to-peer protocol, not a client server protocol, but because we typically only authenticate in one direction, the computer that answers the telephone call is often referred to as a PPP server, while the one that places the call is referred to as a PPP client. It doesn't help that Windows actually separated the outgoing and incoming PPP processes into two separate applications (Dial Up Networking and Remote Access Server).
If you have Linux on the two computers, there is a great primer on PPP that goes through manually setting a connection up using minicom and starting the PPP daemon. You can set up the two modems back to back, type ATD on one and then ATA on the other and they will establish a connection. After the connection is established, then you can exit minicom (making sure that you do not drop DTR and terminate the connection). You can then start the pppd and the machines will authenticate in whatever manner you have configured them for (mutual authentication, one-way authentication, or no authentication).
If you are running Windows on both computers (and I have to assume that you are) then you will have to establish the connection manually as well. It is a little trickier under Windows because you do not have dialtone, nor ring voltage to force an answer. To solve the dialtone problem, you can bring up a terminal window prior to dialing and issue the X1 command (ignore call progress tones), or you can change the dial string to something like ATX1DT. You can then enter any telephone number into the dialup networking dialog box and the modem will go off hook, and then dial the number completely in the blind.
The issue with Windows comes with RAS. I don't know of any way to get RAS to respond manually. Somehow, you have to convince the modem to enter answer mode (ATA).
If this is over a distance, and you are going to be using modems and phone lines, then it really is not a problem at all. You can also purchase a relativley inexpensive Telephone Line Simulator that gives you dial tone and ring voltage.
Don't forget though, since you have an analog modem on each end, you can only achieve V.34 modem speeds (33.6K max).
pansophic