802.1Q is a trunking protocol that allows VLANs (Virtual LAN) between switches by adding a tag on the Ethernet frame. Besides a tag, it also allows setting the 802.1p priority fields (0-7) for QoS (Quality of Service).  When an Ethernet frame has to cross a trunk, the VLAN tag will be added by the switch.