Hub is the hardware networking device that is used to connect several computers and computer devices on network through its port.
Port is the hardware cable connection interface.
A hub can be thought of as the center of a bicycle wheel where the spokes (individual computers) meet.
Data is first transferred from sender computer system to hub and then hub transmits the data to other connected devices through its ports. Hub provides a path for data to transmit from source to destination. The hub operates by amplifying the signal to ensure that data is not lost while being transmitted.
A hub consists of multiple ports.
When data in the form of packet is sent to the hub then it copies the data packet to all of its port.
The number of ports on a typical hub varies from 4 to 4000. A computer is connected to each port of the hub leaving one port free. The free port is used to connect to another hub or to other devices like bridge or routers. When a signal is received on one port of the hub it is regenerated to all other ports.
Hub is most commonly used to connect multiple systems and devices to same LAN.