i assume you mean software ports as in port forwarding for protocols such as bittorrent and VNC as hardware ports are what are on the side/front/back of your Mac like firewire, USB, ethernet.
software ports are what computers use to transfer data between each other eg computer to computer, web server to computer etc. http uses port 80, IMAP email uses port 220, bittorrent uses 6881 by default but can be any unassigned port. these are TCP and UDP ports.
you forward ports in your router's hardware firewall and in your operating system's software firewall to let data be exchanged to and from your computer via the internet.
to forward a port in a router you access its preferences by typing its IP address in your browser. follow you router's documentation to forward ports as they are all different or go to portforward.com and choose you router make. to forward a port in Leopard's firewall you allow incoming connections to the application that wants to use the port you just forwarded in your router. this is done in Security in System Preferences.