Public Domain
There are works that are not copyrighted at all or that have copyrights that have expired. These works are in what is called the public domain meaning that the works are available for anyone to use - for any purpose - without consent or license and without regard to the moral rights of the author.
There are no restrictions on access, copying or derivation of any kind.
What is in the public domain?
Works that were never copyrighted in the first place are in the public domain. This includes general facts, names, titles, numbers, short phrases (though you do have to be careful that names and short phrases are not protected by trademark). Non-copyrightable works also include common data, such as phone listings, dates, addresses, schedules of events, and so on.
Works also fall into the public domain when the terms of their copyrights expire. Lots of artistic works, music, and literature fall into this category.
Alternatively, creators can waive their copyrights and dedicate their works to the public domain for immediate use by others.
Consider whether this statement is true or false: Code found on the Internet is in the public domain. Thus, using such code in one’s own program does not infringe on anyone’s copyright.
This is false!
If an author posts code (or text or images) on the Internet, it does not mean he or she has released the work into the public domain. The work is likely still copyrighted and using the work without the explicit permission of the copyright holder is copyright infringement.
Moreover, just because a work has passed into the public domain, it does not necessarily mean that a digital version of the work found on the Internet is also in the public domain. One needs to look to see if the digital work was published under a restrictive license.
Public License vs. Public Domain
Works in the public domain can be used freely, for any purpose, without any restrictions of any kind.
Works that are available through a public license usually have some restrictions on their use.