A network switch is a computer networking device that connects devices together on a computer network, by using packet switching to receive, process and forward data to the destination device. Switching is a process where a telecommunication device which receives a message from any device connected to it and then transmits the message only to the device for which the message was meant.
A router is a networking device that forwards data packets between computer networks. A router is connected to two or more data lines from different networks. Routing is the process of selecting paths in a network along which to send network traffic. Routing is performed for many kinds of networks, including the telephone network, electronic data networks and transportation networks.