Ti's quite simple really.

Your everyday packet has a source ip, source port , dest. IP and dest. port .
So, when your computer opens a session to the various known ports, it usually uses a source port from 1024 and up.
hence, when you start two sessions, your computer uses two different source ports and sends the packets to the right applications respectfully.