Sometimes you might need/want to know what ports on your machine are being used.
If you try to start up a process listening on some port and it reports that the port is alread in use, what do you do?
The answer is to use this command:
netstat -a -n -o
This will show you all port activity including the PID so you can open up task manager and find which process is using which port.