I assume by ‘unused’ you mean ‘open’ – even though that means the port is in use, it has been opened by an application.
It would help to know if you need the information for a firewall, a server or a workstation. In a firewall as a general rule you block everything and then allow certain ports based on the need to have services like web server (HTTP) or email (SMTP) available.
You can find out about open ports in Windows by typing in the following command:
If you want to know which ports are open to the general public in your external IP address, meaning your firewall, you have to do a scan from outside your LAN, with the approval of your network administrator, and, depending on your service agreement, with the knowldege of your ISP.
One such service is provided by Gibson Research Corporation, at http://grc.com. The free probe is under the heading Shields Up!! You can scan the common ports or all service ports and you get a colour coded report.
If you want to scan the servers in your LAN, there are a number of free products available from reputable security companies. A word of warning: you have to be careful what you do.