It's probably a virus \ malware on your machine.
A sneaky way some malware work is to register additional DNS servers that areresponsbile for serving up malicious content, such a advertising or more malware infected sites. DNSChanger was a well known malware that done exactly this,
http://blog.eset.com/2012/05/31/dnschanger-%E2%80%98temporary%E2%80%99-dns-servers-going-dark-soon-how-to-check-your-computer[
^]
Because they are registered alongside your 'normal' DNS, you get erratic results - sometimes you see the correct content, sometimes you see the malicious content.
Maybe follow the instructions in that article to see if you have any rogue DNS entries, you can achieve similar through cmd->ipconfig /all
Run a full malware scan as well.
Malwarebytes [
^] is my favourite for this.