Most of Ubuntu is free software (meaning not just that you don't have to pay for it, but also that you can distribute it, study its source, and modify it).
However Ubuntu also includes a small amount of non-free software, in separate components:
restricted (non-free, supported) and
multiverse (non-free, not supported). These are programs that may be distributed over the Internet at no charge, but have restrictions that make them non-free. A prime example is drivers for devices which do not have fully-featured free drivers.
You can tell a package is non-free because it's from the
multiverse repository. In Synaptic, check the “Section” in the ”Common” tab of the package properties. Exactly what restrictions are on the package has to be determined on a case-by-case basis. Most can be used and redistributed by anyone, but modifications are not allowed and the source code may not be available. A few, such as
rar, have restrictions even on use. Once the package is installed, you can always find its license in
packages.ubuntu.com, check the “Copyright File” link in the right-hand column.