Oh, I've gotten something like that before. I actually clicked on it, and it took both me and my father a while to try and clean my computer of it.
It can usually come on any type of website- usually I get those kinds of thing from Facebook, though. D: Now I know better and just shut down the website manually, without clicking on anything. You don't have to shut down your computer completely, but it's probably a good idea to check your REAL virus scanner afterwards.
My dad installed this program call Kaspersky on my computer, and it does a good job at telling you that something tried to access your files and whatnot; though all those little notices can get annoying...
Probably the best way to tell if a computer scanning program pops up, but it looks legit, and you happen to click you want your computer scanned, is if it asks you for your credit card #; I doubt a real virus scanning program from Anti-Virus or Ad Aware would want that from you.