Many people are confused by how copyrights and licensing works, and they often unintentionally revert to an option that does not benefit others as it could have. With this post I hope to shed some light on how licensing works, why you should be doing it, and what license to pick based on your personal preference.
If you dislike the idea of copyright altogether, then definitely read on. As copyright still exists virtually everywhere, ignoring it will only lead to less people being able to (re)use what you created. For now, licensing is a necessary evil, and there are some licenses that basically amount to "do whatever you want".
It's recommended to read this entire post. It may take some time to do so, but it will give you a vital understanding of how licensing works and why it is important.
The caveats: I am not a lawyer, simply an active open-source and open-culture proponent that has invested a fair amount of time into researching copyright and licensing. This list may also not be complete, it only lists notable and popular licenses.
Why should I license my things, instead of just putting them online without a license?
Copyright is a whitelisting system. This means that by default, no one has the right to do anything with what you made, unless you explicitly indicate that they do. The only exception to this are certain 'fair use rights' that exist in many countries.
Public licenses never include restrictions as compared to non-licensing, they only introduce (conditional) permissions.
Basically, if you don't license your things, that means a blanket ban on reuse and redistribution. No one can use your things.
Why should I license my things, instead of just putting them in the public domain?
"Putting something in the public domain" is not something that is possible in every country. In the countries where this isn't possible, your "work" will revert to being fully copyrighted and without a license, meaning no one can use your things.
Note that for copyrighted works, the jurisdiction that applies is that of the user, and not that of the creator. Even if you live in a country that allows dedication to the public domain, that does not mean that everyone can use it freely.
There are solutions to this in the form of the CC0 and the WTFPL. They will be discussed later on in this article. If you don't want to think about legal stuff or don't want to read legal texts, and just want it to work like public domain, skip ahead to the WTFPL and use that.
Why should I license my things at all? I don't want someone to steal my work!
Leaving aside the discussion about the ethics of 'piracy', it's important to realize that licensing your work does not mean you are abandoning all your rights. There are many different licenses with different permissions, that allow pretty fine-grained control over what people can and cannot do with your work.
Additionally, realize that using an open license for your work does not make it any easier for someone else to do something you don't want - if someone is going to ignore your copyright, they could've done so just as easily without a license!
Why can't I just write my own license?
While it's technically possible to do so, it's inadvisable for a number of reasons.
First off, the existing popular licenses have (mostly) been written by legal professionals that are very aware of how the copyright system works, and what kind of text a license has to contain to have a certain effect. By writing a license yourself, you risk overlooking things.
Another useful trait of existing licenses is that you can simply refer to their names, and people will either know what it means straight away, or it will be trivial to look it up. This makes reusing your work more inviting to someone that doesn't have a lawyer to check things, and just wants to know whether a license will allow him to do something.
Long story short, unless you have a very specific situation, don't write your own license. If you really need a specific license, then be sure to consult a legal professional about it.
Okay, so what kind of licenses are there?
Note that in the following sections, "work" refers to the thing you made, and "authors" refers to you and anyone you worked with to create that work (plus, in many cases, those that make modifications).
If you don't want anyone to modify your work
If you want to allow someone to share your work, but don't want to allow them to make modified versions (derivatives) of it, you can use this license.
Creative Commons No Derivatives (CC-ND): You can share the work, but you can't make any modifications to it, and you must give credit to the authors. This license is general-purpose. While Creative Commons licenses are typically not ideal for software, there does not appear to be a commonly accepted software equivalent of this license, so you're probably stuck with the CC-ND.
If you want to force others to share under the same license
There are various licenses for you to choose from, that allow you to force someone to share your work and any derivatives (modified versions) under the same license as you picked. These are some popular ones:
GNU General Public License (GPL): This is a very commonly used software license. It requires anyone to use the GPL if they want to share your code or a modified version (derivative) of it. It also requires anyone distributing a binary version of your code, to include the source (or give a download link to it). Additionally, it requires them to give credit to the authors.
Creative Commons Share-Alike (CC-SA): This is a license that is commonly used for multimedia, but it applies to pretty much any creative work. You should, however, not use it for software. It requires users to give credit to the authors, and to share your work and any modified versions under the same license.
GNU Lesser General Public License (LGPL): This license is similar to the GPL, but you are only required to release modifications of the work itself under the LGPL. Other software that only includes LGPL-licensed code, does not have to be licensed under the LGPL itself. This license is commonly used for software libraries.
GNU Affero General Public License (AGPL): This license is similar to the GPL, but it also requires you to publish the (modified) source code to any user of the code, even if it's served as for example a network service. Examples of this would be a gameserver or a content management system.
If you don't want anyone to use your work commercially
If you only want to allow non-commercial usage of your work, there's one license that you can use.
Creative Commons Non-Commercial (CC-NC): Your work can only be used in a non-commercial fashion, and you must give credit to the authors. Note that the definition of 'non-commercial' in this license has caused controversy, and this license was not designed for software. Usage of this license is not recommended.
If you just want people to give you credit
If you just want to require people to give credit to the authors (you and maybe others), and don't really mind what they do with it otherwise, these are some licenses you may want to consider.
BSD 2-clause license (BSD-2): This license requires anyone distributing your work or any derivatives of it, to give credit to the authors. It also includes a disclaimer of liability.
BSD 3-clause license (BSD-3): This license is the same as the 2-clause version, but it also forbids anyone from using the name or trademarks of the authors, to endorse any modified versions.
MIT (Expat) license: Similar to the BSD 2-clause license. Requires distributors to give credit to the authors, and disclaims liability. The difference is that while the BSD 2-clause license requires someone to give credit to contributors as well, the MIT license does not.
If anything goes
Creative Commons Zero (CC0): This license dedicates your work to the public domain where possible, and if not, it allows anyone to do with your work whatever they want, and there are no requirements for redistribution, attribution, or anything else. It also includes a disclaimer of liability.
If you don't care what people do with it, and don't want to bother them with legal texts
Do What The Fuck You Want To License (WTFPL): This license allows anyone to do with your work whatever they want to, without any restrictions whatsoever. The advantage of the WTFPL over the CC0 is that it does not have any legalese in it, so anyone can understand it. The entire license can be summarized as "do whatever the fuck you want to".
What's your favorite license?
The WTFPL. I believe in encouraging people to do the right thing (free redistribution of modifications), rather than forcing them to do so.
If you have any more questions, suggestions, or criticism, feel free to leave a comment! I'll answer to the best of my abilities, and update the article if necessary.
Update: I should probably have mentioned this straight away, but this article and other posts on my blog are all licensed under the WTFPL, and can therefore be reused and redistributed as you wish :)