@Pixel2019, @qdrives doesn't mean it wrong. Just the question you are asking is very basic and it means, that before diving in, it could help you to have a look around to get more information. For example, what you are missing here is the process how PCB is manufactured.
When Through hole vias are manufactured, basically you take your PCB with multiple layers, they drill through the whole PCB and put copper inside of the hole (this process is called plating). And when you put copper inside a through hole via, this copper will connect any layer in your stackup. So, when you use a through hole via, you do not specify what layers you would like to connect, you just specify it goes from the TOP to the BOTTOM Layer.
Maybe have a look at these my videos, they can help:
- How is a multilayer PCB made?
https://youtu.be/67WhV0EDqCA- PCB Manufacturing - Important facts you should know:
https://youtu.be/f6_svRNJYlsAlso, try to google for some pictures of cross section of a through hole VIA, you can see how the copper inside of a via connects layers together: