Public domain refers to works and inventions not subject to a third party's exclusive rights.
Most commonly, "public domain" refers to lack of copyright.
Before the late twentieth century, works entered the public domain after a period of years. But the Copyright Act of 1976 began the periodic extension of the term of U.S. copyright, which would become recognized as a pattern of "perpetual copyright on the installment plan" in 1998. So nowadays, the most common way for a work published after 1922 to enter the public domain is by the author intentionally abandoning copyright in the work.
In order to avoid liability for copyright infringement, some dial-up bulletin board systems would require all uploaded software to be in the public domain. They eventually relaxed the rules to allow any copyrighted computer program licensed for free redistribution. The word "freeware" eventually came to refer to these programs, yet some BBSes continued to refer to freeware as "PD".
Starting in the 1980s, works began to be published under free software licenses, such as the GNU General Public License and the BSD License. These copyright licenses struck a balance between copyright and the public domain in order to preserve "freedoms", or the right of the owner of a copy to use, improve, and share computer programs and other works.
The GoodCodes naming convention used by Cowering's GoodTools uses (PD) to refer to to ROMs distributed freely over the Internet, whether or not it is in the public domain or free software in the GNU sense. This and the name of the PDRoms homebrew repository follow the BBS "misuse" of the term.
An invention in the public domain was published before anyone applied for a patent on the invention, or the patent was applied for more than 20 years ago. For example, the LZW compression used in GIF images was under a patent owned by Unisys until 2003, when it entered the public domain.