Routing is a network service that allows communication across sub-networks. A sub-network is a single broadcast domain and a single broadcast domain can be associated with a Virtual LAN configured across a managed switch network.
Routing, the Network Interconnection Service
The internet 'IP' protocol is an extremely capable at moving or 'routing' data between sub-networks and networks alike. Whist this is a good thing for authorised network access is also a point where unauthorised entry can wreak havoc with a computer system especially a system containing legacy devices and operating systems'
Routing is the network serivice that allows data flows to pass from one sub-network to another. An industrial routing service is largely defined by interfaces available, the protocols that can be routed and the rate at which the packets can forwarded. The routing service is one function of a Router device, other Router functions include firewalling, virtual private networks (VPN), redundancy protocols (VRRP/CARP), packet capture utilities, and many more.
A routed sub-network is sized using the 'sub-net mask' parameter and presents a default gateway to the Internet 'IP' Protocol end points that reside on the respective sub-network.
IP packets, destined for end points on remote subnetworks, are forward to the default gateway to be routed towards the destination network. If a route exists between source and destination networks communication can commence.
I say 'can' rather than 'will' as routers also filter packets. This filter is called a firewall, router firewalls can drop packets to introduce an additional level of security to a network.