As has been mentioned before GUFW is merely a frontend (GUI) for UFW and that in itself is a frontend for iptables. Although I have GUFW I rarely use it, only to look at the rules. Again it is easier to use the Terminal.
It depends entirely on what you want to do - and remember that iptables most likely already works. Type 'man iptables' in Terminal to see how it performs. Next type 'sudo iptables -L' to show all the chains selected (if any).
Right, now UFW, presumably you have nothing so far.
Now type the following rules (using the Terminal as superuser i.e precede all commands by sudo).
ufw default deny
ufw allow out 20,21,22,25,80,139,443/tcp #the ports most widely used- mail,ftp etc
ufw allow out 53,137,138/udp #for port explanations google list as required
ufw deny out to any # close all other ports
The above is the simplest, however if you need a printer (cups), you also need to open port 638 type 'ufw allow out CUPS' and if it is a network printer this will use port 9100. You also then need to give the IP address as follows:
ufw allow out proto tcp from port 9100 to 192.168.x.0/24 # x is depending on what the router will issue.
Lastly remember sequence in commands. You cannot 'deny out to any' followed by allowing CUPS out (obviously).
Hope this is useful.