The ports 0-1023 are called well known ports, they are registered with special services:
and so on, see /etc/services.
This is the server side waiting for a client to connect.
The client ( telnet, webbrowser, putty ...) will use a random high port (ports are 16 bit so 0- 65k ) for example 38743, it opens the connection by sending a tcp packet with set syn flag to the server.
That packet has the sender ip and port and the destination ip and port.
The server replies with a packet with ack flag set, and uses the clients packets sender ip and port as destination.
So if your Webbrowser opens connections to 2 different webservers it uses different random high ports for each server.