A program searches for sites without up-to-date software, infects them, and then they start automatically starts generating the bogus pages on their own.
The botnet masters just needs to keep creating new sites to hold the malicious payload as needed, and then, after they infect enough Windows PCs, they can use the compromised computers for nastier purposes starting with spreading more malware and eventually stealing valuable financial data from your computer.
The solution, as always, is to keep your anti-virus software up to date, and always keep it on. Never assume that even a totally boring and innocuous Google search is safe. Google tries to mark sites as being suspicious, but in this case, perhaps because the cracked sites themselves just pass you through to the truly malicious site, Google hasn't been able to catch them yet. I have no doubt that Google will get it right. But, in the meantime, keep your defenses up!