TCPView and CurrPorts: See Which Programs Open Ports in Windows
The TCPView utility shows open TCP and UDP connections, and the programs that opened them, in a clear and convenient way.

It’s free, written by Mark Russinovich (Sysinternals).
TCPView or netstat
You can, of course, get by with the built-in command:
netstat -bn
The -b switch shows the program that opened each connection, and -n prints addresses and ports as numbers. For -b you need to run the command prompt as administrator.
But TCPView is simpler and clearer: the list updates by itself, new connections are highlighted, and you can close an unwanted connection or end the process right from the program window.
CurrPorts — another utility (2013)
Later I came across another free program for viewing open ports and connections — CurrPorts from NirSoft. There are versions for 32-bit and 64-bit systems.

CurrPorts shows all open TCP and UDP ports on the computer: the port number, the name and path of the process that opened it, the remote address and port, the process creation time and the user it runs as.
Right from the program you can close an unwanted connection, kill the process holding a port, and save the list to an HTML, XML or text file. If there are open ports belonging to unidentified applications, CurrPorts highlights them in pink — handy for keeping an eye on security.
You can download it from the NirSoft website or from here (version 2.09, with Russian interface):
Download CurrPorts
Download CurrPorts x64