Difference between copyright, patent and trademark
<p>From one article by Richard M. Stallman, I came to know that copyright, patent and treadmark are totally different things and people are usually using the misleading term "Intellectual Property" to address them.</p>

<p>So, in order to understand software licensing, I want to know what are these leagle terms related or different with eachother. And what "Intellectual Property" stands for?</p>

<p>Stallman is simply wrong: that's like saying that stealing a car and stealing a motorcycle are "totally different things" because there is some difference. They are all examples of the concept "intellectual property", though they differ under the law in particular ways. Copyright of books and copyright of computer programs is likewise covered by somewhat different law, but they have something in common. The essential thing that all forms of intellectual property law have in common is that they protect a person's intangible intellectual creations: they are treated like property, just as the fruits of an individual's labor is property.</p>

<p>As far as "how much of the actual code" is the same, you would have to look at the legal code of a particular country. In the US, trademark law is gathered together in <a href="https://www.law.cornell.edu/uscode/text/15/chapter-22" rel="nofollow noreferrer">Title 15 under Chapter 22</a>; patent law is in <a href="https://www.law.cornell.edu/uscode/text/35" rel="nofollow noreferrer">Title 35</a>; copyright law is <a href="https://www.law.cornell.edu/uscode/text/17" rel="nofollow noreferrer">Title 17</a>. Patents and copyrights are similar in being a constitutionally enumerated power of Congress (Art. I, Sect. 8, Cl. 8), the power "To promote the Progress of Science and useful Arts, by securing for limited Times to Authors and Inventors the exclusive Right to their respective Writings and Discoveries". Patents and trademarks are similar in that they are both controlled by the <a href="https://en.wikipedia.org/wiki/United_States_Patent_and_Trademark_Office" rel="nofollow noreferrer">Patent and Trademark Office</a>. All three have in common that they are the based in the common law, and were until the <a href="https://en.wikipedia.org/wiki/Trade-Mark_Cases" rel="nofollow noreferrer">Trademark Cases</a> held to be covered by the Copyright Clause.</p>

<p>From a practical perspective, understanding the intellectual and historical underpinnings of copyright, trademark and patent is probably not useful in understanding software licensing. Instead, it is most useful to understand copyright law and contract law, and perhaps patent law just in case some piece of software is patented (see <a href="https://en.wikipedia.org/wiki/Software_patents_under_United_States_patent_law" rel="nofollow noreferrer">this</a> for an overview in the US, and <a href="https://en.wikipedia.org/wiki/Software_patents_under_United_Kingdom_patent_law" rel="nofollow noreferrer">this</a> for the UK). The basic idea of software licensing is that only the author can authorize making <em>any</em> copies of their program, and a license is a legal device for stating the conditions under which permission to copy is granted. </p>

copyright intellectual-property patents