A router is responsible for forwarding data packets between different networks. Routers operate at the network layer (Layer 3) of the OSI model and use IP addresses to make forwarding decisions. They connect multiple networks together and determine the best path for data packets to reach their destination across different networks. Routers can be used to interconnect different LANs, VLANs, or WANs and ensure that data reaches its intended destination efficiently and securely.