If you're having to replace it, meaning it stops working entirely, then there are other issues. They shouldn't just break - even the cruddy stuff that the cable companies provide. Running your network stuff on at least a surge protector (mine are on battery UPS) is a must.
That said, the box that the cable company gives your usually does several things in one box. First, it turns the fat black round cable in to an RJ-45 cable (that's the one that looks like a large telephone cable). That's the "modem" part.
Second, it does Network Address Translation. You're probably going to have more than one device (computers, doorbells, smart TV's, cell phones, etc) connected to your home network. Essentially, the cable company assigns you a single network address - meaning only one thing can talk on the network. The box takes that one address, says "I'll speak for everyone", then gives out a bunch of addresses to your devices behind it. Think of your dad standing at the front door of your house talking to a neighbor. The neighbor keeps asking questions. Your dad shouts back into the house, someone answers him, and he relays the answer to the neighbor. The conversation flows through one person, but everyone can talk. That's the "router" (more or less) portion of the box.
Finally, it usually (but not always) functions as a WiFi unit. As long as it's going to talk to everyone anyway, it may as well provide a wireless signal so that all the wireless devices in your house can connect to it.
I mention all of this because, if you're going to buy your own gear, you need to know what each piece does. You need to know how complex (or non-complex) you're going to get.
The most common way to replace the cable company's stuff would look like this: (1) You replace the "modem" part (the thing that turns the cable company thick black cable into the RJ-45 Ethernet cable) with your own cable modem. Now, compatibility between modems and cable companies vary, but a brand called "Arris" makes very standard, reliable modems. I'd look on the cable company's website (it may be tough to find), or call their tech support, and ask what model of Arris modem is compatible with their network.
That's the piece that you'll screw the black wire in to. It'll have a place to plug in the RJ-45 cable as well. At this point, we've turned the cable signal into the Ethernet telephone looking thing. We need the "router" and "wireless" piece more than likely.
Fortunately, "wireless routers", a box that does both jobs, are everywhere. There's a million of them. Linksys, netgear, TP-Link all make respectable gear. You'll plug the RJ-45 cable from the back of the Arris modem into the wireless router (it'll likely have a port marked WAN or something).
Certainly the wireless router will need some configuring. It isn't deep voodoo, but either you or a good friend (who's either willing to teach you or be available for questions later) will need to have a passing knowledge of networking. It's really beyond the ability of this forum to explore all the possible setup scenarios.
It's hard to recommend a turn-key solution that's under $200. Stick to recognized brands. Your network gear will need firmware and hardware updates, since patching the bugs and flaws is necessary to keep it secure. A lot of off-brand gear either doesn't have them or is deliberately insecure.