A network device is a piece of hardware used to connect computers, servers, and other electronic devices within a network, enabling communication and data transfer. Common examples include routers, switches, and access points.