A network switch connects devices on a computer network by receiving and forwarding data packets to their destination. It provides connection points for end users into the enterprise network and controls information flow within the local area network (LAN) using MAC addresses. There are two main types of switches: modular switches which provide flexibility through expansion modules, and fixed-configuration switches which include unmanaged, managed, and smart switches of varying capabilities and costs. A switch works at the data link layer to inspect packet headers, maintain a MAC address table mapping devices to ports, and forward packets only to the proper destination port to minimize traffic.