Usually, yes, but the two do not always come as separate boxes. A modem connects your home to the internet provider’s network. A router connects your devices to each other and shares that connection. Many providers supply one device that does both jobs, and for many homes that is the simplest option.
What a modem does
A cable modem converts the signal on the coax line into a network connection your equipment can use. It connects to the provider’s network and receives a public address from it. A standard cable modem usually does not provide Wi-Fi or share the connection with several devices.
Knowing what is used to connect a network to the internet makes the rest easier to follow. The modem handles the link to the provider, and the router handles the network inside your home.
What a router does
A router sits between your devices and the modem. It gives each device a private address on your home network and shares the one public address among all of them, a process called network address translation (NAT). Most home routers also provide Wi-Fi, several LAN ports, and a basic firewall that blocks unsolicited incoming connections by default.
A common question is does internet cable go in lan or wan. The cable from the modem goes into the router’s WAN port, which is the internet side. Your computers, printers, and other devices connect to the LAN ports, which are the home side.
Can you go without a router?
Yes, for one computer. Connect the computer directly to the modem with an Ethernet cable, and it can usually get internet access with no router at all. This works, but you lose Wi-Fi, you cannot easily share the connection with several devices, and the computer is more exposed to the internet than it would be behind a router.
Provider gateways
Many providers supply a gateway, which combines a modem and a router in one unit. It is convenient: one box, one place to set up Wi-Fi, and one thing to replace. Some gateways give limited control over their settings, and their Wi-Fi may not be as strong as a separate router.
You can often put a gateway into bridge mode, which turns off its routing so another router can do that job. Not every model supports it, and the menus differ, so check your gateway’s manual.
Using your own modem and router
Buying your own modem and router is common. Before you buy a modem, check that it supports the cable standard your provider uses (DOCSIS), and check whether the provider needs you to activate it on your account or only supports certain models.
Then connect the modem to the router’s internet port, usually labeled WAN or Internet, and connect your devices to the router’s LAN ports. The router handles the rest of the home network.
When you need both for multiple connections
With two cable lines, you need two modems or gateways and a router that accepts two internet connections. A single gateway usually does not handle a second line on its own. Each modem’s line goes into a separate WAN port on the router, and your devices connect to the router’s LAN ports or Wi-Fi.
In short: a single computer with no Wi-Fi may only need a modem. Multiple devices with Wi-Fi need a modem and a router, or a gateway that does both. Two cable lines need two modems or gateways and a dual-WAN router.