Routers operate at the network layer and are responsible for forwarding data packets between different computer networks. They make decisions about the best path for data to travel based on IP addresses.