The term switch most commonly refers to a device that segments networks at the data link layer. This type of switch is effectively a multiport bridge. Like a bridge, the layer two switch learns the location of hosts on a network by inspecting MAC address information in frame headers. Also like a bridge, the layer two switch segments a network into multiple collision domains.
Switches differ from bridges in two key respects. First, switches generally feature multiple ports (8, 16, 24 ports or more); bridges typically provide only two ports. Also, switches provide higher throughput than bridges. This is because switches analyze and process frames in hardware, whereas bridges, an older product category, are often software-based.
The word switch is also used in a generic way to refer to any device that forwards data traffic selectively based on some sort of addressing or control information. So although layer two switches are the most common type, layer three switches, multilayer switches, and other types of switches can also be found in networks.