"It depends". Specifically, it depends on what VLANs are allowed to pass over a trunk.
If you have two switches, with VLAN 1, 10 and 20 on them (no more).
Port 1 (on both switches) is the trunk between the switches. Across the trunk, we allow VLAN 1 and VLAN 20.
On Switch 1, we assign ports 2-5 to VLAN 1, port 6 to VLAN 20 and ports 7-12 to VLAN 10.
On Switch 2, we assign port 2 to VLAN 1, ports 3-10 to VLAN 20 and ports 11-12 to VLAN 10.
I'll write the switch/ports as switch# / port# from here. From this, we can see that 1/2-1/5 and 2/2 can all talk to each other (they're on the same VLAN, the VLAn is on a trunk between the switches).
Similarly, 1/6 can talk to 2/3-2/10 (same VLAN id, VLAN allowed across the trunk).
However, while ports 1/7-1/12 can all talk to each other and 2/11-2/12 can talk to each other, there's no communication between the switches, because we have not allowed te VLANs across the trunk, so while they have the same VLAN id, they're not "the same" VLAN.