A bridge connects and filters traffic between two or more network segments at the data link layer, while a switch performs similar functions but with more ports and advanced capabilities, often at a higher efficiency.