See Virtual Local Area Networks (VLANs) and pay attention to the Tagged Ports and Untagged Ports section.