There are basically four "tools" for the protection of intellectual property (IP): patents, trademarks, copyright, and trade secrets. Much like the way you will not use a screw driver to drive a nail or a rake to sweep hardwood floors, the right IP tool needs to be used for the subject sought to be protected. Here's a brief explanation of the tools:
Patents: patents are used to protect inventive "ideas." As such, using appropriate formulation, a patent can protect an invention regardless of its implementation. For example, if the invention is a certain manufacturing control system, a good drafting of a patent would provide protection regardless of whether the system is implemented as a mechanical system, an electrical system, an algorithm driven computer control, etc. The protection lasts for 20 years from the date the patent application is filed.
Caution: There are two peculiarities to the patent system. First, a patent doesn't give the inventor the right to practice the invention, but rather the right to exclude others from practicing it. For example, if I get a patent for a pen having a laser pointer on top, I can't sell such pens if someone else has a patent on lasers. However, I can prevent that guy from selling pens with lasers. So, unless we come to some sort of an agreement, neither one of us can sell pens with laser pointer.
Second, a person can be found to infringe a patent even if he never heard about it and had no knowledge of it. That is, infringement of a patent has nothing to do with copying. So, even if you developed something independently and had no knowledge of the patent, you can still get sued and be found liable.
Trademarks: The legal function of trademarks is to signify the source of the product. So, as long as it serves that purpose, the trademark can take on almost any form, in addition to the traditional word or symbol. For example, the color pink has been designated a trademark of Dow Corning. If you are reading this on a computer, you are probably familiar with the "Intel inside" melody--using sound to serve as Intel's trademark. The shape of the Coke bottle is a trademark of the Coca Cola company. Trademark protection has basically no time limit.
Copyrights: Copyrights protect an expression of an idea, set in a tangible medium. That is, the protection is extended only to the actual expression chosen by the author. However, a similar idea expressed in a different manner, and which was not copied from the original, does not infringe the copyright. So, unlike patents, the protection here is against copying. The tangible medium can be anything preservable, e.g., paper, canvas, clay, CDROM, etc. The protection is for the life of the author plus 50 years.
Trade Secrets: The legal definition of trade secret is very broad: any information that provides a competitive advantage and that is unknown to the general public. The word "any" is underlined to emphasis that the information need not be of any specific character, e.g., technical, inventive, etc. Rather, any information can come under the definition. The requirement that the information provide a competitive advantage sets a very low bar. For example, a list of suppliers can be a trade secret.
The other requirement--unknown to the public--is what makes trade secrets very fragile and requires much diligent efforts to maintain the protection. That is, if the secret is divulged to even a single person outside the organization, the protection vanishes. This is why the organization must be diligent in protecting its trade secrets and ensuring that a non-disclosure agreement is signed before disclosing the information to persons outside the organization. Similarly, confidential documents need to be stamped "Confidential."