On Windows:
To get started, open the command prompt by clicking on Start and then typing cmd. In the command window, go ahead and type in the following command:
netstat -a -n -o
In the command above, the -o parameter is what will add the PID to the end of the table. Press enter and you should see something like this:
Now to see the name of the process that is using that port, go to Task Manager by pressing CTRL + SHIFT + ESC and then click on the Process tab. In Windows 10, you should click on the Details tab.
By default, the task manager does not display the process ID, so you have to click on View and then Select Columns.
You might also need to look into services running in background. To do that right-click and select open services as shown below:
Hope it helps :)