It is not a virus, but a fake anti-virus scanner.
There are methods for removing such scareware, but they depend which one you got, and the procedure is generally long and involved. BleepingComputer.com has most of the best methods to remove them, using tools such as RKill.exe, MBAM and SAS, as well as unhide.exe where the scareware hides files and folders.
We can only get these malware problems by visiting suspect and malicious web sites. We cannot get these via virus infection.