Article I, Section 8, Clause 8 of the Constitution states that Congress has 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."Modern statutes break down patents into three types:
In short, anything having "utility" is patentable. If it has a purpose, it is patentable so long as it is new and unobvious. Even a light bulb changer, like the one the right, is patentable.
Courts have excluded from this abstract ideas, laws of nature and natural phenomena. However, where the line between a patentable idea and law of nature is drawn is not always so clear. For example, is taking the square root of a number abstract? Is it a law of nature? Is it a natural phenomena? Is it just plain old obvious? Yet, algorithms are patented all the time when tied to a structure.
For example, Google has a plethora of patents on algorithms used for searches. In other cases, the Patent Office and courts have rejected patents for concepts such as signals and computations performed by artificial intelligence for edge detection as being abstract.
A further discussion of this topic can be found here in this article.
Your invention must be new and different from what already exists. A unicycle may be known already, but if you add training wheels, that is a novel invention. If the invention has been patented, published, known, or used by others, it's not novel. Thus, I may have lost my ability to file a patent application for unicycle training wheels because the idea has now been published on this website!
If you invented it first and caused it to be any one of those things, the U.S. Patent Office will give you a year grace period to file your invention, but the laws here can be tricky and it is highly inadvisable to disclose your invention before filing at least a provisional application.
Your invention also must not have been obvious to a person having ordinary skill in the field. If Bozo the Clown would think adding training wheels to a unicycle is obvious, no patent. Courts have decided that a patent may be novel if there is some sort of long felt need, there is commercial success of the invention, and other factors. The patent process can be subjective and this is why it is important to hire a good agent to argue your case before the Patent Office.
See also the next page, "The Patenting Process".