A major decision in your intellectual property strategy is whether to protect an asset with a patent or as a trade secret. Both forms of protection come with their own advantages and disadvantages, and they are largely mutually exclusive.
A patent requires filing an application and approval of the application by the United States Patent Office before you obtain patent protection. You must disclose your entire invention to the public (because patents are public records accessible to anyone) to obtain a patent. A patent is valid for a period of twenty years from the date you filed the patent. You can assert a patent to stop someone from making, using, or selling your invention anywhere in the United States, even if they developed the invention without knowing about your patent. A patent cannot be lost without going through a formal process such as a lawsuit or certain Patent Office proceedings.
A trade secret, generally, is any information, invention, or process that provides independent economic value to your business from being kept secret by your business. Trade secret protection exists from the creation of the invention and continues as long as it remains subject to efforts to keep secret (for example, the Coca-Cola formula is a trade secret that has been kept secret for over a century). No formal application is necessary to create a trade secret, although there are certain steps a business can take to help solidify and ensure trade secret protection (from contract language, to data security mesaures, and more). However, a trade secret can be lost if it ceases to be a secret. This requires you to take steps to protect the secrecy, including proper employee training and the use of non-disclosure agreements. You also cannot successfully assert a trade secret against someone who came up with the same invention by reverse engineering yours, or if they came up with it independently.
You should consider whether your intellectual property strategy is better served by keeping a trade secret or applying for a patent. There are often ways that you can employ both, such as by patenting a product but retaining the process to manufacture it as a trade secret.