A software license key is a pattern of numbers and/or letters provided to licensed users of a software program. License keys are typically created and delivered via a license generator once a software user has paid for the software and has agreed to the conditions of use and distribution as legally specified in the software license (also known as an End-User License Agreement, or EULA).
From a software developer standpoint, the purpose of license keys is to prevent the developer's software from being copied, shared or otherwise illegally used (aka pirated) by non-licensed users. A separate class of software apps known as keygens (short for key generators) has been created with the purpose of bypassing the legal product registration and license key activation process by generating counterfeit license keys.
See "Is Software Ownership the Same as Licensing?" in the "Did You Know..."section of Webopedia.