A Virtual Local Area Network (VLAN) is a logical subnet within a switch or an entire physical network. It can extend across multiple switches. A VLAN separates physical networks into subnets by ensuring that VLAN-enabled switches do not forward frames (data packets) to another VLAN (although the subnets can be connected to shared switches).


How a Switch Distinguishes between VLANs

This is done by associating the work stations to a specific VLAN using a specified format.  This is known as VLAN membership.  There are four prominent VLAN membership methods



Wiki-Article: https://en.wikipedia.org/wiki/Virtual_LAN