The modem provides the hardware and communication protocol to link the computer to the telephone network. If there is a computer at the other end of the line with a modem that has a compatible communication protocol, the two computers can exchange data.
Typically, one computer plays the role of a server and the other plays the role of a client. The server may provide the client with access to the Internet. Therefore, a modem can provide Internet connectivity through a telephone network, which is the most frequent use of modems.
The main advantage of modem Internet connectivity is that telephone network coverage is much larger than areas and places with direct Internet access. The main disadvantage is that modem Internet connectivity is relatively slow and can be expensive.
As alternatives to modems, telephone companies have developed various specialized technologies to efficiently transfer data through their networks and connect to the Internet. This includes DSL for land lines and 3G for wireless telephone networks.
Technologies to connect to the Internet that do not involve telephone networks include cable modem, T1, fiber optic, and satellite links.

