As the name suggests, the meaning of hub is a center of activities. In network terminology, it is a device where the entire connecting mediums come together. It is a medium used to collect signals from the input line(s) and redistribute them.
A hub basically acts as a signal splitter; it accepts a signal through its input port and outputs it to the output ports. Some help in regenerating the weak signals prior to sending them to the intended output lines. Others help in synchronizing the data communication (in simple words, it not only provides the means of interface within the network, it also provides some additional and useful features).
Sometimes multiple devices are interconnected in the network. Generally they are used more commonly where star topology (connecting directly to a central unit) is used. Usually when we build a network using two or more computers, we need a network management device. However, it is possible to connect two computers to each other directly without using one, but when we add a third computer in the network, we need a hub to allow proper data communication within the network.
A network hub, or repeater, is a fairly unsophisticated network device. They do not manage any of the traffic that comes through them. Any packet entering a port is broadcast out or “repeated” on every other port, except for the port of entry. Since every packet is repeated on every other port, packet collisions result, which slows down the network.
There are specialized applications where this can be useful, such as copying traffic to multiple network sensors. High end switches have a feature which does the same thing, called port mirroring. There is no longer any significant price difference between the two.
There are many types of repeaters with various features/specifications. Each provides the type of functionality you need in building a network. There are three main types: Passive, Active and Intelligent.
A passive hub is a central device to which other devices connect, and which forwards signals. It can be used to connect several computers together in a star configuration. It does not regenerate signals or process them in any way.
In contrast with a passive device, which only forwards the signals to all ports, an active device, also known as a repeater, is a multiport network device that amplifies LAN transmission signals. It also forwards the signals. The choice of what to use is ultimately up to you.