The function of Routing is to Route packets between different networks (between different LANs - Local Area Networks).
Routers guide and direct network data, using packets that contain various kinds of data—such as files, communications, and simple transmissions like web interactions. It’s a Gateway (network's outermost point of connection with external networks) using information in its routing table or routing policy, it directs the packet to the next network on its journey.