A router is a device that forwards data packets along networks. A router is connected to at least two networks commonly two LANs or WANs or a LAN and its ISP's network. Routers are located at gateways the places where two or more networks connect and are the critical device that keeps data flowing between networks and keeps the networks connected to the Internet. When data is sent between locations on one network or from one network to a second network the data is always seen and directed to the correct location by the router. They accomplish his by using headers and forwarding tables to determine the best path for forwarding the data packets and they use protocols such as ICMP to communicate with each other and configure the best route between any two hosts. The Internet itself is a global network connecting millions of computers and smaller networks — so you can see how crucial the role of a router is to our way of communicating and computing.
A router is a layer -3 device works on layer-3 of the OSI reference model. Router works on an IOS that is a 16 bit operating system.latest IOS is 12.4 by CISCO.
The main functionality of a router is that it stop the broadcast that a layer 2 device (switch cannot do).
Apart from the above it is used to join 2 more dissimilar class WAN networks.
Router is a layer 3 device.Routers are used to connects networks together.Routers routes packets of data from one network to another.Routers breaks up broadcast domain (it is the set of all devices on a n/w segment that hears all broadcast sent on that segment).breaking up a broadcast domain is important because when host or server sends a n/w broadcast every device on n/w must read and process that broadcast.but when router interface receives this broadcast then router discards this broadcast without forwarding it to another network. Routers can filter network based on layer 3 information.