When you have a cable-based or phone line based connection, the data packets are transmitted over a cable in analog form, which needs to be converted to digital format. This function is carried out by the modem. It establishes the link with the Internet service provider (ISP) and handles the data transfer, to-and-fro, from the ISP server.