It's very simple.
Many sites place cookies on your computer. These cookies, which are small text files, are used by sites to store information such as login information or where you last were on a site for their own purposes. A site like Google can keep track of your searches through them and also what sites you have visited. It can use this information to try to show ads to you that are more targeted to your interests.
If you clear your cookies on your system and visit a few sites again, you will most likely find that you will see random ads until they build up some site data on you again.
IMO, any site that wants you to enter an email address to get a report is a very likely spam source. I have experimented with this in the past by creating new, unused for anything else, emails for each site. It's interesting to watch the spam start flowing and to which ones it goes.
I've been a self-employed web developer for over 10 years and deal with this type of thing almost every day.