Its probably because u are using a pirated copy of windows 7.this has happened because u may have automatic updates turned on and when u connected to internet windows automatically tried to update and it got detected that it was not genuine. Re installing Ur windows is the best solution.next time don't forget to turn off auto updates
I've had this happen to me at one time (with Windows 7 Professional).
It was absolutely genuine and just a glitch I think caused by the desktop not being used (powered on) and connected to the Internet very often.Somehow after a restart it never appeared again.
Do a reinstall and then turn off automatic updates. Then go to windows update and read all the list of updates it has in the list. one of them will say some like protects against non genuine copies of windows or something like that. Its usually not checked to begin with if it is checked for some reason then un-check it.
Then right click on that particular update and select "hide update" you should be good from then on. Or you could buy a copy. Unlike most on here i'm not the holier than thou type so If you buy it great if not the instruction above should help.