It varies from one router to the next. It normally explains it briefly in the instruction manual. Failing that, there might be an FAQ on the router manufacturer's website regarding port forwarding. Failing that type in "port forwarding <whatever make and model your router is>" into Google.