Permission to use a piece of intellectual property is called a "License." This is the term used for copyright, patent, trademark, and trade secret. A license is a type of contract that allows a party (called a "Licensee") to use intellectual property under conditions set by the IP owner ("Licensor"). Any use of the property that is within the terms of the contract is considered legal and not infringement. Any use that goes beyond the scope of the license agreement constitutes infringement.
If permitted by the license agreement, a licensee may be able to sub-license the intellectual property. Some license agreements allow sub-licenses, while others prohibit this practice. But in no event can the licensee pass along to a sub-licensee more rights than he or she has in the original license agreement.