system
Given the following post, respond as if you're commenting on Reddit:
human
What is the difference between a router, switch, and hub?

I understand that a modem is used to basically translate a signal (from cable to Ethernet, for example).

I understand that these three devices are used to route packets between connected devices on a network, but what exactly is the difference, and why would you choose to use one type over another?

Are there other devices that fall into this same category that I am missing?

Thanks for the clarification :)
gpt
Very generally speaking:

* Hubs are the lowest level, and they are basically dumb machines.  They take all data coming in one input and broadcast it to the outputs, then receive data from the outputs and send it back to the input.  Think like a USB splitter.

* Switches are a little more intelligent.  They can detect packet collisions and manage multiple packet streams going to multiple inputs and outputs at once.

* Routers are the most complex, and are basically full fledged computers than can manage data almost like a server.  They can provide NAT translation to subnetworks, QoS, run dhcp, etc.