Router-on-a-stick is a method of inter-VLAN routing where a single router interface acts as a trunk link to a switch. This interface is divided into multiple logical subinterfaces, each tied to a VLAN and assigned an IP address. When a host in one VLAN sends traffic to a different VLAN, the switch tags it with the VLAN ID. The router routes the traffic to the correct subinterface and VLAN based on the IP addresses and switch port VLAN configurations. This allows a router to interconnect multiple VLANs using only one physical interface, reducing hardware costs compared to using one interface per VLAN.