Well, in the simplest form.
You generate a list of acceptable key's, or potentially manually create keys as needed. For example, a user buys the product and you ship a program set to work with only that key.
Anyway, user enters key. Your program will then compare the input key to it's list of...