A patent is a government granted right that allows the inventor to exclude others from making, using or selling the invention in that country that issued the patent. Granting this right is to encourage inventors to spend the time and effort to invent new products and technologies.
In the United States, the term of a new patent is 20 years from the filing date of the patent application. Patent filing is not cheap; it may cost you from a few hundred dollars to a few 10 thousand dollars. You also need to pay the maintenance fee after the filing.
When a patent expires, others are allowed to make, use or sell the invention without needing the permission or paying any royalty to the inventor. The government requires patents to expire to avoid the situation that one person controls the entire industry if that person was the first to conceive of a type of product.
You cannot file any patent application as your wish. Patent law specifies the general field of subject matter that can be patented and the conditions under which a patent for an invention may be obtained. The invention needs to be useful, new and non-obvious. It can be a process, manufacture, or composition of matter, or any new and useful improvement.
Prior art cannot exist for an invention to be patentable. The invention should not be known or used by others in this country, or patented or described in a printed publication in this or a foreign country, one year before the patent application for the invention is filed.
According to the law, only the inventor may apply for a patent for his or her invention, with certain exceptions. If two or more persons make an invention jointly, they apply for a patent as joint inventors.