A switch is a device used on a computer network to physically connect devices together. Multiple cables can be connected to a switch to enable networked devices to communicate with each other. Switches manage the flow of data across a network by only transmitting a received message to the device for which the message was intended. Each networked device connected to a switch can be identified using a MAC address, allowing the switch to regulate the flow of traffic. This maximizes security and efficiency of the network.
Because of these features, a switch is often considered more "intelligent" than a network hub. Hubs neither provide security, or identification of connected devices. This means that messages have to be transmitted out of every port of the hub, greatly degrading the efficiency of the network.
An Ethernet switch operates at the data link layer of the OSI model to create a separate collision domain for each switch port. Each computer connected to a switch port can transfer data to any of the other ones at a time, and the transmissions will not interfere with the limitation that, in half duplex mode, each line can only either receive from or transmit to its connected computer at a certain time. In full duplex mode, each line can simultaneously transmit and receive, regardless of the partner.
In the case of using a repeater hub, only a single transmission could take place at a time for all ports combined, so they would all share the bandwidth and run in half duplex. Necessary arbitration would also result in collisions requiring retransmissions.