Process
What is a process?
A process is basically a copy of a program. So, if you run a program like Notepad multiple times, each specific time will get its own Process. A process uses resources, such as available RAM on your computer. If you look at Task Manager and you see the program running multiple times, each different occurrence of the program can be a different process.
How are processes assigned?
The PID ("process ID") numbers are assigned by the operating system each time a new process is made.
What are processes good for?
Using the process ID (which identifies an exact, specific copy of a running program), you can determine which software program that process is an instance of. You can do this using TaskList (from the command line), WMIC PROCESS GET /FORMAT:LIST (from the command line), or Task Manager. In Task Manager, on some newer versions of Microsoft Windows, you may need to go to the "Details" tab. If there isn't a column for showing the PID, you can add it. (In Windows 10, at least, you right-click on a column name, and then can select visible columns. As memory serves me, older versions of Windows had a menu option for this.)
Another command that you may find useful is netstat. I see you're using netstat. Try adding the "-b" parameter. (This option is rather specific to Microsoft Windows, which I presume you are using based on the C:\Users\User> in your prompt.) That will have Netstat try to use the PID to figure out the name of the executable file, and print that on the next line.
All of this is entirely unrelated to the port number.
Port Numbers
What is a port number
A port number is used as part of a network connection. Not all network communication uses port numbers. For instance, ICMP, used by TraceRoute (named "TRACERT" on Microsoft Windows) and the Microsoft Windows "ping" command, doesn't use port numbers. The most common protocols that do are UDP and TCP. (Maybe SCTP is the next-most-common?) Many protocols, including HTTP(S) and SMTP (for E-Mail) use TCP, so port numbers are used.
What are port numbers good for?
It is possible to have multiple TCP connections between the same computers, and port numbers are used to identify those connections. For instance, if your E-Mail program is getting E-Mail, the network connection may be between [LOCAL PORT 52534, REMOTE/FOREIGN PORT 25], while your web browser can create a connection using [LOCAL PORT 54499, REMOTE/FOREIGN PORT 443]. That way, when the remote computer responds and the incoming traffic is defined as [LOCAL PORT 54499, REMOTE/FOREIGN PORT 443], your computer knows that traffic is not meant for your local E-Mail program. Actually, your web browser could create multiple TCP connections in order to do something like downloading multiple graphics at the same time. When your computer receives graphical data, the port numbers can help your web browser know which connection the data is meant for, so the web browser can know which graphic the received data was meant for.
(Note: The square brackets are just a notation I made up to make that paragraph a bit easier to read. In Netstat's output, the port numbers are shown after the colon. I don't typically prefer to use the term "foreign" to describe port numbers, but I did in this case because that was the term used by netstat.)
How are port numbers assigned?
In general, most software simply tells the "network stack" that it wants to make a network connection. In modern operating systems, the "network stack" is built in as part of the operating system (although back in the days of Windows 3.1, a network stack was typically added during the installation of a software program like Microsoft Internet Explorer or Trumpet Winsock). The software program will typically tell the network stack something like, "Create a new TCP connection to remote port 443." The network stack will determine what source port number it wants to use.
Summary
Processes and port numbers are very different things. I agree with most or all of the information in the other answers here. (However, I added my own answer here because I thought a bit more detail, like where the numbers are assigned from, might help to make the distinction a bit more clear.)
8The same as the difference between an employee ID number and an office number. – chrylis -on strike- – 2018-01-04T17:01:52.650
in reply to MaQleod according to https://en.wikipedia.org/wiki/Network_socket a socket is characterised by at least a local socket and a port.
– barlop – 2018-01-05T00:16:09.890BTW OP, the text in your CMD window looks squashed. I see this on a lot of PCs that have upgraded to Windows 10 from 7 or 8. You can fix it by changing the font size, saving, then changing it back. – wjandrea – 2018-01-05T02:06:06.953
@wjandrea I notice it gets squashed if choosing raster and then with raster you get some funny dimensions options and that you can even preview and look funny. But if choosing courier new then you don't get ridiculous dimension options, and with some possibly some slight fiddling you can ensure the setting is right. – barlop – 2018-01-05T06:21:09.033