A hub is basically a hardware which is used to connect several computers together.
A hub that contains multiple independent but connected modules of network and inter-networked equipment.
You can also say that a hub is a centralized device through which every devices such as printers, computers, are connected with each other. This made star topology.
In star topology, twisted-pair wire is run from each workstation to a central concentrator.
Hubs are multi-slot concentrators into which a number of multi-port cards can be plugged to provide additional access as the network grows in size.
Hubs can be either passive or active. Therefore there are only two type of hub:
Active hubs electrically amplify the signal as it moves from one connected device to another. Active concentrators are used like repeaters to extend the length of a network.
Passive hubs allow the signal to pass from one computer to another without any change.
Hubs are simple devices that interconnect groups of users.
Hubs forward any data packets including email, word processing documents, spreadsheets, print requests, graphics, they receive over one port from one workstation to all for their remaining ports. All the users connected to a single hub or stack of connected hubs are in the same segment, sharing the hub's bandwidth or data-carrying capacity.
As more users are added to a segment, then they compete for a finite amount of bandwidth devoted to that segment.