Its the same kind of method all those pirating sites use so that when you search for an exact version of software they have a megaupload version and a rapidshare version... its basically a way of mass producing spam.
If I were to make that, I'd just store all user searches and make a file with that keyword in the template, the header, in bold, etc. Once you get to a certain point it'll increase exponentially - just make sure all the pages link to something and are linked to.
Other than that, I'm not going to give a guide out on how to make useless spam