A hub and switch are essentially the same except a hub's throughput is shared across all ports. I.E. You can get a hub with 10Mb ports and the hub has 5 ports. If you have 5 devices connected and they are all using network I/O at the same time, they might only be able to get 2Mb on each port. A switch has dedicated throuput on all ports. Also, hubs aren't too smart. They don't know what port the device they are looking for is on, so they broadcast across all ports. A switch knows which segment a device is on and only send data down that port.
A router is more like a mega-brain traffic cop. It will route all data across a LAN/WAN as needed. It will have filters to redirect traffic and/or drop packets if necessary. It can communicate with other routers to learn routes to other devices and more.
Not to mention that a HUB will Broadcast any ARP requests or any RIP traffic to everyone. Hubs are not advisable to use due to this port flooding. While HUBS use broadcast domains, Switches use Multicast domains, which means it will only flood ports that it does not have in its routing table, and it will not flood the port in which the arp/rip request originated (client / server, router, etc.)