IANAL, but from what I know, it partially depends on where you live.
"The 1886 Berne Convention first established recognition of copyrights among sovereign nations, rather than merely bilaterally. Under the Berne Convention, copyrights for creative works do not have to be asserted or declared, as they are automatically in force at creation: an author need not "register" or "apply for" a copyright in countries adhering to the Berne Convention."
As for what countries are a part of that: Belgium, France, Germany, Haiti, Italy, Liberia, Spain, Switzerland, Tunisia, and the United Kingdom initially signed it. The US also adheres to it. Finally most World Trade Organization countries adhere to most of the clauses of the convention.
Simply add "Copyright (c) <NAME> <YEAR>" to your work in a noticeable location and it's automatically copyrighted under your name for the next ~70 (depends on country of origin) years or so.
If you want to make it copyleft, or permissive, I would look into Creative Commons licensing and Public Domain works respectively.
(Now if you are talking about code, there's a completely different set of licenses to use).