Router is a device which connect two or more network. It is a networking device that forwards data packets between computer networks. Routers perform the traffic directing functions on the Internet. Data sent through the internet, such as a web page or email, is in the form of data packets. A packet is typically forwarded from one router to another router through the networks that constitute an internet work until it reaches its destination address.

Router has a lot more capabilities than other network devices, such as a hub or a switch that are only able to perform basic network functions. For example, a hub is often used to transfer data between computers or network devices, but does not analyze or do anything with the data it is transferring. By contrast, routers can analyze the data being sent over a network, change how it is packaged, and send it to another network or over a different network. It males a table of origin address and destination address for each packet,called routing table.It always search for the shortest and reliable time taken path. For example, routers are commonly used in home networks to share a single Internet connection between multiple computers.
There are two different types of a router: the router and the wireless router. In this example, the router allows all the computers and other network devices to access the Internet through wire. The wireless router allows a laptop to wirelessly connect to the home network and access the Internet as well. Routers don’t just route traffic to other networks, they learn which are the fastest routes and use them first.