Hub
Hub is a network hardware device for connecting multiple
Ethernet devices together and making them act as a single network segment. It
has multiple input/output (I/O) ports, in which a signal introduced at the
input of any port appears at the output of every port except the original
incoming.
switch
A network switch (also called switching hub, bridging
hub, officially MAC bridge) is a computer networking device that connects
devices together on a computer network, by using packet switching to receive,
process and forward data to the destination device. Unlike less advanced
network hubs, a network switch forwards data only to one or multiple devices
that need to receive it, rather than broadcasting the same data out of each of
its ports.