I depends whether you have dial-up or broadband Internet.
For broadband, you have a router/modem connected to the phone socket. Then you have a cable from the router to each computer.
You can also do it wirelessly with one or both computers (you need a wireless router/modem). Newer laptops typically have wireless built in. If not, you need a wireless adapter for the computer.
Many broadband subscriptions include a free wireless router/modem in the deal.