About those virus warnings in web pages

What should we do when we open a page and we get a warning saying that, apparently, our computer is infected by a virus?

NOTHING.

Those warnings aren't truthful, they're frauds, and their only aim is to convince people to download a program that is a virus or some sort of malware. These are just scams to take control of our machine. First, the machine, and soon after that, our bank account.

So do nothing – browse away from the page and don't download anything.