It can be caused by a number of things such as pirated software or even issues with the registry keys. Also, if certain tools used to connect/authenticate with Microsoft are blocked or removed then you may also received this message.
You may need to type in your key again assuming this is a legit copy.
Start > Right Click on Computer > Properties then at the bottom you should see "Change product key." After that, enter the key again.
Some MBR tools can also help fix this issue.
You can always live chat, email, or call Microsoft to clear up this issue.