Rather:
A hub repeats everything from any node to all nodes on the network. (bad)
A switch is a smart hub that only repeats wire packets to ports on the appropriate port.
A router exchanges high level traffic between different networks. (slow)
It all gets a little convoluted, for example my wrt54g is both a router and a switch (or at least a hub).