It basically works like that: You download some program you want or to access a hidden area on a website. With that software comes a hidden program, that will rest in your system without any signs that it exists.
That little adware system sits and waits until you go to Yahoo or another search engine and gets a wake-up call by the browser. Now it looks into its history for how long it has been sleeping. Depending on how it is configured it decides what to do next, when you start a search on the search engine.
Some adware programs are configured to steal the first click from the first result page on the search engine and then fall asleep for at least 1 hour.
Other adware programs just wake up after 10 minutes of internet usage and direct your browser to the next available advertising partner.
However, these practices are not a rare thing - these are a wide spread problem for advertisers and webmasters alike. There is no cure, nor a real protection. Go and update your adware scanner is all you can do!
We check our files as often as possible, so people do not push adware to your systems via us.