A port is the point through which data is transferred between a computer and devices such as a keyboard or a printer, a computer and a network, or, in this case, one computer and another. Some have permanent designations, such as port number 25, which is assigned to e-mail data, and port number 80, which is used for Web data. Others are virtual and are assigned a port number as needed. If you are using telnet, a port number is assigned when the session starts. The number is canceled when the connection is closed.
Port scanning is a way to probe a remote computer to find out what ports are open.
There are literally dozens of programs available in various places on the Web that that can be used to ping a machine and find out what ports are responding. After discovering what ports are accessible, the next step is to look for ways to use the open port as a doorway into the machine. Hackers look for vulnerabilities in the programs that are reachable through an open port. These vulnerabilities are known as exploits, and catalogs of exploits are available on numerous Web sites. Once a hacker finds an exploit, attacking a machine can be pretty easy.