A switch is a network device that operates at the data link layer (Layer 2) of the OSI model, and it efficiently forwards data frames within a local area network (LAN) based on MAC addresses. Switches are essential for creating high-speed and low-latency connections in modern Ethernet networks, improving network performance and reducing collision domains.