A router is a device which works at OSI layer 3 (Network layer) level and is responsible for transferring data packets from one network to another.The objective of the router is to reduce the amount of broadcast domains in a network as a router does not forward broadcast domains
Router determines where to send the packet based on the destination ip address of the packet and refer its routing table to determine the best path to reach a specific network
IPV4 Packet header format