A hub is physical layer device whose function is to repeat any inbound signal out of all of its other ports. For this reason, a hub is known as a multiport repeater.
Hubs do not inspect addresses at any layer. They do not distinguish between headers and payloads. They do nothing to reduce the size of either broadcast or collision domains. In general, hubs to do not segment networks; rather, they extend networks and provide access to more devices. Hubs also provide no security. It is easy to sniff packets on a network by attaching to a hub.
Hubs are less and less common on today's networks, because low cost network access can now be provided by commodity switches. During the decade of the 1990s, switches were more of a premium product and hubs represented a cost effective approach to connectivity for smaller networks. However, because hubs do not segment the network at all (doing nothing to reduce collisions or broadcast traffic), there is no way for hubs to compete with switches on a performance basis. As switch prices declined in recent years, switches became more common for access networks and the use of hubs diminished.