You take all the recommended procedures to prevent yourself from acquiring malware or adware on your computer but still you have lots when you put your computer in for a service. Here is a great example of how it's done.
By clicking on regular adverts on legitimate sites such as MSN bait you by attracting you with a "juicy" story. This will redirect you to an unscrupulous site and from there server decisions are taken as to what information should be sent back. It is possible to detect if you are a web bot such as Google indexing the web. It is also possible to detect if you are in the UK running Internet Explorer on Windows 10 and then serve you up some different information such as described in the good example.