Users coming from Windows often search the net for software they need and install it from there. That's wrong for Ubuntu. Use the package manager (Software Centre, Synaptics, ...) to install software.
Try avoid installing software not contained in the distro's official repository as much as possible, and if you really need it be careful to use only trustworthy sources that you can expect to provide updates if necessary. PPAs aren't necessary trustworthy.
The Ubuntu default installation doesn't install any software listening on the outside network so you don't have to care about ports by default.
If you want to setup a firewall ufw and its GUI frontend gufw are easy to use. Note that they only provide filtering on ports, IP numbers and such, not on programs or users. If you don't want to provide services to the outside world blocking any port < 1024 for incoming traffic is usually a good thing.
https://help.ubuntu.com/community/Security is a good starting point for reading.