Imagine a row/column table, where physical ports are columns, and VLANs are rows. Each VLAN can connect several ports, and each port can be on several VLANs. Ports not connected through the same VLAN are isolated, and VLANs are always isolated from each other.
Traffic that enters and exists the switch can be tagged with an ID (that, for the sake of simplicity, will be the VLAN ID), or can be untagged. Devices that are configured to expect untagged traffic will not see tagged traffic, and viceversa (and the same for different IDs). And the switch can also tag or untagg traffic as it enters or exists.
A port can be configured for untagged traffic, or tagged traffic (several IDs are allowed), but not for both at the same time. In ports that connect to the CPU, untagged traffic goes to a "ethx" interface, and tagged traffic goes to "ethx.y".