This sounds like something you get from "scareware" - that is when a pop up box comes up saying your computer might be at risk. NEVER NEVER click on anything like that - in fact close your browser and shut down your computer if necessary to make it go away. Do not even click on the "x" in the corner.
If you need an anti-virus or anti-malware program, go to a trusted site to download it - I always use Cnet.com.