First off, the HOSTS file is the wrong way to go about doing what you want to do. That file really is only there as a kind of legacy holdover from some of the networking code Microsoft took from FreeBSD to create WinSock. Not that it stops wannabe tech guru types who will put it up on some blog or website proclaiming how they're some kind of computing demi-god for finding this hidden feature of Windows, never stopping to think that maybe it's hidden for good reason. Most people who've used Unix/Linux long enough will just groan and roll their eyes every time they see it. The HOSTS file is kind of a poor man's DNS system, which can be extremely handy if you have a small network of 5-10 systems with static IP addresses... Sort of like was common in the very early days of computer networking, but bears absolutely no relation to what you see today.

Rather than block the site, why not simply stop going to this site? If it's trying to peddle some kind of malware, why would you keep going back? You could also use something like NoScript for Firefox to allow you to selectively whitelist sites that can run scripts and prevent the popup from even happening. If you're using Chrome or IE all bets might be off, since AFAIK, Firefox is the only web browser where extensions can actually prevent the browser's rendering engine from even downloading some part of a web page. With Chrome, and I think IE, things like AdBlock Plus can only filter elements out after the page has been loaded by the browser. They just then run that through the filter and display the results, so essentially every page is being rendered two times even if it might happen so fast you can't tell the difference. The distinction is important because it represents an opportunity for some ne'er do well to inject unwanted code into things that might be executed despite any protections you may think you have in place.

Another option would be to block this site with some firewall software. Using the HOSTS file is the worst of all possible options because it's a text file, meaning it's very slow for a computer to open and read it. Every single time you load a web page, the computer will check the HOSTS file and it will go one by one down the list to see if the site you're trying to go to matches. The larger the HOSTS file, the more of a delay you introduce into loading every single page and you do it in probably the single most inefficient way possible, which only makes the delay more pronounced. There are far better options out there, pick one and forget you ever heard of the HOSTS file. It's a relic of a bygone age.