Ports provide a means by which computers communicate with one another using standard protocols. Each protocol is assigned to a fixed port number so that the computers know which port to check in order to communicate using the specified protocol. When you start up a program that will communicate with remote computers using a specific protocol, the port assigned to that protocol is the one that it will use to attempt to communicate. The port number being used needs to be the same on each computer attempting to communicate in order that the message packets sent by the one computer are correctly received and recognised by the other.
Port numbers fall into three ranges. Ports 0 through 1023 are called "Well Known Ports" and are assigned to their specified purpose by the Internet Assigned Numbers Authority (IANA). Ports 124 through 49151 are available for general use and may be registered with IANA if desired. Ports 49152 through 65535 are used where a dynamic or private port is required.
You can protect your computer against some forms of attack over the internet by restricting the ports that your computer allows other computers to use to communicate with it. For maximum security, you should ensure that access to all ports, except those that you need to use, are blocked.
Some of the "Well Known" ports include:
A complete list of well known ports can be found on the IANA web site.
The following are some other ports you may find referenced:
This article written by Stephen Chapman, Felgall Pty Ltd.