You need "Network Cards" in both machines. The details differ a little depending on your operating system, but 2 computers can be linked directly, or can be linked through a hub or a switch, even USB wirelessly. The machines would be set up for Internet Sharing (A pretty much Wizard Driven Process in any flavor of Windows or Mac OSs), with the dial-up modem of one machine being the operating modem. There are some very simple networking tutorials available on the websites of networking equipment manufacturors.
www.3Com.com
www.linksys.com (I often spell that wrong ... be careful)
WWW.dlink.com
are some. You'll google up a passle of hits with Networking as a keyword. Dive in.
I'd go with a switch ... just a few bucks more than a hub, more versatile and "Upwardly Mobile" if and as your network expands and/or your connection improves. If 2 machines is all you want, then just the proper network cable can connect them. They will be able to share not only the 'net, but files; get a good firewall and anti-virus programs (all the time ... 1 machine or however many of them).
All that said, if you have typical dial-up, and the only reason you want to network the two machines is to share internet, splitting the bandwidth between two computers will likely provide an unsatisfactory web experince for both users. Don't go online at the same time. Get a $3 phone line splitter and take turns. You'll be happier, trust me.
And trust security software ... get it, use it, keep it current.
timber