Port forwarding is a technique to overcome some shortcomings of NAT (Network Address Translation). It is called Application sharing in some router firmware.
The basis of port forwarding technique is that you have an external IP address on your router which is accessible by the Internet, and you have a LAN (Local Area Network) IP address on your computer only accessible by other computers and devices on your internal network. In order for the Internet to be able to make a connection to this computer on your internal network, you need to let the router know which port to listen on, and once connection request is received, where on the internal network to send this connection request. Thus, you usually will need three pieces of information to enable this function:
- What port on the public IP address should the router listen to?
- What LAN IP address should the router forward the request to?
- what port on the LAN IP address should the router forward the request to?
There are also advanced network techniques that automatically configure port forwarding information such as port knocking and UPnP (Universal Plug 'n' Play).
Each router is slightly different in how you access their port forwarding page, so use this page to figure out how to access those router settings.
Once you have found the proper page on your router, you must then know what ports to open. Try this page or googling "<game name> ports" and see what ports a given game needs open.
Problems Caused by closed ports
Single player games usually don't need any ports forwarded for normal use, but multiplayer games do. Thus, a multiplayer games may be unable to or outright refuse to connect to the internet if the necessary ports are not forwarded.