VLANs provide a means to group devices as if they were the only devices in a subnet.
VLANs are configured in Layer 2 switches.
Broadcast traffic within a VLAN is not broadcast to devices outside the VLAN even if they are attached to the same switch. This is one of the main advantages of a VLAN. It can shield devices from seeing the broadcast traffic of other devices, including ARPs.
If two devices are attached to the same layer 2 switch but they are in different VLANs, the physical traffic between the two devices must travel the path of the connected cables from the layer 2 switch thru any other switches until it reaches a router, which will then send the traffic back down the same wire to the original layer 2 switch. There the traffic will go to the port of the device on the other VLAN.