VLANs are a logical grouping of users: Users A, B and C are grouped together in VLAN (IP subnet) 1, Users D, E & F are grouped together in VLAN (IP subnet #2). In a "normal" flat (layer 2 only) network, VLAN #1 is invisible to/from VLAN #2. To allow traffic to flow from 1 discrete IP Subnet (in this case VLAN #1) to another discrete IP subnet (VLAN #2) you need a device that can direct traffic from one network to another and that is a router.
A router allows for data to from from 1 network to other networks.
Veritas Principium Libertas