The quick answer to your first question is yes and yes.
When a tagged frame enters a trunk port, the tag is always removed. Using your example of a tagged frame with VLAN 10, the switch checks to see a couple of things:
- Are there any access ports on the switch on VLAN 10? If yes, then the frame may be sent out of those ports untagged.
- Are there any trunk ports with VLAN 10 allowed? If yes, then the frame may be sent out of those ports as well. In those cases, the VLAN 10 tag is added once again to the frame as it exits the port.
(Keep in mind that in both of the above cases, whether a frame actually exits from one of these ports also depends on the mac-address table. If you need clarification on this, you can check out Rene’s lesson on how a switch learns MAC addresses.)
Concerning your second question:
The answer is yes. When you configure subinterfaces on the router itself, you are also enabling dot1q encapsulation, which essentially allows the router to perform VLAN tagging on the specific subinterface. You also specify the VLAN associated with the subinterface so that the appropriate VLAN can be tagged.
I hope this has been helpful!