If you are trying to visit YouTube (or any other site) and do a search for "YouTube" on Google, Yahoo etc., please note that the first choices could be labeled as "ad". These are advertisements for websites which are malicious and should not be clicked on.
You did not actually download a virus. Just restart the computer to remove any pop-up windows you may receive.
If you click one of the links marked as "ad", you will receive a screen similar to this:
Simply reboot the machine if you are unable to close the window.