Hubs A hub is a "dumb", layer 1 device. All it does is link physically link computers connected to it together, it does not care about mac addresses, or any protocols. If one machine sends a packet it goes to every machine connected to the hub regardless of their settings. The machine will then read the higher level protocol headers and trailers to determine whether it will accept the packet. Using a hub is like connecting all the computers on one cable.
Switches, on the other hand, are a layer 2 device, meaning that they read mac addresses. If computer A wants to send to computer B, the switch will read the mac address and give the two machines a dedicated connection (not shared), so A's packet would not go to C, D, and E, as it would on a hub. This dedicated connection allows for Full duplex communication, there is not a hub that can do full duplex. You need a switch or a router to do that. A router is a level 3 device, by the way, which means it handles IP addresses.