You cannot normally just connect the two pc's on the same phone line and
expect them to communicate between themselves. Even if both pc's have modems
(assumed as you mention phone line), the way modems work more or less
prevents this.
There's usually three choices to play computer to computer games. Other than
this connection difference, the "logic" is similar. One pc is the "server"
that "hosts" the game, e.g. allows other pc's to connect as "clients" to
play the game.
1) both pc's connect to the internet. The "server" simply waits for
connections from the "client". The client connects by the user entering the
IP address of the server.
2) ethernet cards and local area connection. As it's a network, one can have
it setup using TCP/IP which basically makes this a special case of #1 above
(this is what most people would do when having some "gaimg party" where
everyone gets together some place). Otherwise the game uses one of the
"other" protocols, usually IPX or similar. The server is simply started and
waits, the client usually "browses" the network looking for the server.
3) modem to modem. Because of the way modems work each pc needs it's own
phone line. Simply connecting a phone line between the two modems will not
"normally" work (I say normally as you can get around it but it's not "easy"
for a novice).