Not only is patenting an invention a huge milestone for a new inventor, it will kickstart your idea as a marketable product.
Invention Must Be Novel
Patents on utilities in the United States and its territories are governed by the United States Patent and Trademark Office. To obtain a patent, an inventor must prove that the invention is useful and not a cookie-cutter idea.
Useful, in that it fulfills a function, beyond being ornamental and/or aesthetic.
Novel - in that it has not been invented before If the same invention is created by more than one person separately, the patent belongs to the first to apply, but not to the first to invent.
Unique - Beyond being something that is created, it has to be shown that the invention was not obvious to a person with knowledge or skills in that area.
Ornamental elements applied to useful objects are subject to design patents, as long as they prove to be novel, non-obvious and ornamental.
It may have been done before
Inventing costs money, and sometimes lots of it. Before you invest time and money in making models, iterations, and prototypes, and long before you apply for a patent, do your research. Examine whether there are inventions similar to yours; and whether or not they are patented. You cannot acquire a patent on elements of your idea that are already known and/or protected.
A Prior Art Search is a comprehensive investigation from various sources to determine the "patentability" of an invention; which elements are novel and not obvious. The search is performed on databases, publications and any source where an invention can be publicized. Among these are the USPTO's databases, Google Patents, and hundreds of sources, both government and industry, nationally and internationally.
It is preferable that this search be performed by a person or entity with experience and expertise in this area, such as an attorney, patent agency or prior art search firm. It involves robust research and knowledge of technical language to interpret publications, applications and patents.
Your Employment Situation
If you are employed, and your work consists in any way of creating intellectual property (like an engineer or programmer) you are likely to be subject to confidentiality or non-compete rights assignment agreements with your employer.
The confidentiality agreement obligates the employee not to disclose and/or use information designated as confidential by their employer within their employment relationship. Therefore, if an employee uses information acquired through his or her employment for non-work related purposes, such as developing an invention on his or her own, he or she may be violating his or her obligation to preserve and not disclose confidential material.
On the other hand, the non-compete agreement prohibits the employee from working on or for projects and businesses that may compete with the products and services offered by the employer. This may extend even after the employee's relationship with the employer has ended. Therefore, if an employee in his or her free time develops an invention on his or her own, which can be considered as "competition" to his or her employer, the employee may be violating his or her obligation to "non-compete.
If you are under an IP Assignment, it constitutes an agreement in which you as an employee grant your employer all intellectual property rights over creations made as part of your job duties, or made with employer materials and/or during working hours. So if you, in your spare time, develop an invention or creation and it relates to the work you do ordinarily for your job, that invention may be owned by your employer and not by you.
Examine well the agreements you have with your employer, to see how far your limitation, if any, extends to inventions created in your own time and with your own materials.
Applying for a Patent is Publishing Your Invention.
You can say that a patent is like a contract between inventors and the public (government) in which the inventors, in exchange for making their invention public, are given a limited monopoly on it. To prevent others, for a limited period of time, from using, manufacturing, selling, importing or offering to sell the invention
By applying for patent protection, you waive the possibility of keeping your invention confidential. Being public, you cannot obtain protection as a trade secret.
Analyze the likelihood of success of a patent. In your alternative, it is possible to maintain ownership of the invention as a trade secret. Trade secrets can be information, objects, inventions and/or any asset that generates value for a company and its value is a product of its confidentiality.
You got a 18.18% upvote from @minnowvotes courtesy of @lilypanama!