What is a VLAN and why does it matter?
A VLAN is a Layer 2 segmentation construct. Instead of buying a separate physical switch for every traffic type you want to isolate, you configure logical segments on a single managed switch and tag frames with a VLAN ID defined in IEEE 802.1Q.
In practice this means your IoT devices — smart bulbs, thermostats, cameras — can live on VLAN 20 while your workstations sit on VLAN 10, and neither can initiate connections to the other unless you write an explicit firewall rule permitting it. The router (UniFi Gateway, Dream Machine, or Cloud Gateway) routes between VLANs at Layer 3 and enforces those rules.
Why bother? Three reasons: security (a compromised IoT device cannot pivot to your NAS), performance (broadcast storms on one VLAN do not flood others), and manageability (DHCP assignments, DNS overrides, and DPI policies can be scoped per VLAN).