as these elements are quite important for the licenses, and not everybody differentiate them properly.
Disclaimer: IANAL. I Am Not a Lawyer. Specifically I am not your lawyer, and everything said here is purely informative and my opinion as a developer. If some of the stated data is wrong, or can be expanded, please use the comments and I will update the main article with the important bits.
Patents.Patents are a monopoly right given by governments to inventors so that there is incentive to spend time and money inventing new things. The government gives you the right to decide who has the right to make new copies of your invention for a limited period of time.
For software its not 100% clear what is patentable, where and what it covers specifically. It changes from place to place, and although on the USA its possible to patent software, in the EU its not, although the European Patent Office is accepting submissions and granting them.
If somebody contributes to your software, he/she/it may or may not give you patent rights. This is quite important, and in doubt you have to ask, as you may get sued later.
Copyright.Once you have some work done, you have the right to decide who can copy it or not.
Every single line of code has its own owner. Line nr 101 can be of A and 102 of B. Copyright can be transferred. When a programmer is hired to do some work for some company, the copyright if of whoever pays the developer to do it, unless otherwise agreed. It is as if he, as developer and owner of his lines, decides to give the copyright of them to the company for money.
If there is no copyright transfer, the authorship is of whoever wrote it, with the given license.
If somebody creates a code it decides the license of that snippet; if its incompatible with the license of the rest of the program, then there is no right to redistribute it without breaching the license. Because of this normally the license of the rest of the program is adopted, but not always. For example parts of the linux kernel are GPLv2 or above, other parts are just GPLv2, and some small bits are BSD. As not everything is "or above" then effectively the linux kernel is GPLv2, and should be redistributed by those terms.
If somebody cedes its ownership to another entity, that entity is the new owner. The owner of the code can relicenciate it.
Than means that if part of your program es GPLv2 and you redistribute it, and somebody do some collaboration adding some code, you can not relicenciate (to any license, including private ones) without this developer ceding his copyright. Copyright can be shared, so he still has the ownership, but you too.
That is the reason why Sun/Oracle asked to sign a copyright assignment document before accepting any colaboration to OpenOffice, as they were making their own private version, with some non public addons, and even providing it to IBM (IBM symphony). For this extra copyright assignment there were not so many developers, and some forks were made keeping, as could not be of any other way, the GPLv2 license. Finally LibreOffice was made with most of the old developers, and it did not ask any copyright assignments. Collaborations skyrocketed, although the first big change they made was code cleanup.
Trademarks.Trademarks are the right to be identified with some name or logo.
Trademark owners decide who can use that trademark and for what. Some trademark owners are quite protective with their brands (most, actually), and other are more permissive given some limits (I can only think of Debian and Linux).
It does not matter which license you choose trademark is always on. For example firefox is MPL, and anybody can make a fork of it and add or remove features, but it can not be called Firefox. At most, maybe, you can say its based on Mozilla Firefox, but do it with care. Firefox is mozilla's only, and if you change just a line of code, then its not Firefox. For example Debian had to change their Firefox-based browser name to Iceweasel, as they apply security updates on their own pace, normally quite close to mainline, but sometimes faster. and most important they want to keep that right.
This way, even if your software is BSD and somebody just compiles it, it can not be promoted in anyway with your product name, unless you give them the right to do so, for example Xerox is in danger of loosing the trademark.
It is interesting that in some places if you brand becomes so known that it identifies a generic term, you may loose the trademark right.