A number assigned to user sessions and server applications in an IP network. The port number resides in the TCP or UDP header of the packet.
Source Ports
The source port, which can be a random number, is assigned to the client and is used to keep track of user sessions. The combination of port number and IP address is called a "socket."
Destination Ports
The destination port is used to route packets on a server to the appropriate network application. For example, port 80 is the standard port number for HTTP traffic, and port 80 packets are processed by a Web server. Destination ports are typically well-known ports (0-1023) for common Internet applications such as HTTP, FTP and SMTP. It can also be a registered port (1024-49151) that vendors use for proprietary applications.
Source Becomes Destination and Vice Versa
On the return trip response from the server, the destination port number and IP address become the source port number and IP address. Likewise, the source port and IP become the destination port and IP.
We're Listening
The software that responds to a port number is said to be "listening" for its packets. More accurately, the term should be "looking" for its packets, because it is comparing numbers, not "listening" to numbers.
An FTP conversation consists of requests sent by the client and responses sent by the server.
After the client connects, the server sends a response to the client, either accepting or rejecting the connection. This initial response is called the greeting.
If the server accepts the connection, the client sends zero or more requests to the server. Each request is handled as follows:
The client sends the request to the server.
The server sends one or more responses to the client. The last response either accepts or rejects the request. Previous responses are marks.
hope this helps