Check out example codes for "how to check the ports in use in windows cmd". It will help you in understanding the concepts better.

Code Example 1

Get-Process -Id (Get-NetTCPConnection -LocalPort portNumber).OwningProcess

Code Example 2

netstat -ano | findstr 8080

Code Example 3

netstat -aon

Code Example 4

netstat -ab

Learn ReactJs, React Native from akashmittal.com