I dont think it is possible unless you make search at a search engine owned by hacker. To be safe from this you should use a proxy to hide your real IP address.
I think he means he might click on a link when performing a search that will put spyware or adware on his computer. That is the price of using the internet and it is up to you to make sure your antvirus software is up to date and you scan daily for spyware and adware.