A patent is a type of intellectual property protection. When you secure a patent, the U.S. Patent and Trademark Office maintains a record of it. You can sure someone for using your patent without permission.
You cannot protect everything with a patent, which is why there are multiple types of intellectual property protection available. It is essential that you match your protection to whatever you want to protect.
The USPTO explains there are three generally requirements to secure a patent for something. The invention must be something useful. It must not be something obvious, and it must be a new concept.
Types of inventions
Patents may cover composition of matter, an article of manufacture, a machine or a process. It can also be improvements upon an existing invention. For example, someone could patent a self-writing pencil because it improves upon the existing pencil.
Patents may also cover the design for something manufacturable and plant varieties uniquely created by you, the person who seeks the patent.
There are some inventions or creations that you cannot patent. For example, music or literary creations are not something for which you can get a patent, but they do have protection under copyright laws. In may cases, things you cannot patent have other intellectual property protection available.
In general, you cannot patent, abstract ideas, laws of nature or physical phenomena. You also cannot patent anything that is not useful or that the USPTO deems publicly offensive.
Anything that does not meet the requirements as nonobvious, new and useful is not something for which you can get a patent.