Computers connect to the internet through a modem or network interface. Data arrives in packets from the network and is passed to the computer’s ports, which may also connect to phones or other devices.