A network switch connects multiple computers together on a local area network (LAN) and operates at the data link layer of the OSI model. It receives messages and transmits them only to the intended device, unlike a hub. Switches create separate collision domains to allow connected devices to transfer data simultaneously without interference. They can operate at different layers, with layer 3 switches having additional routing capabilities. Switches establish network connectivity and performance within a LAN.