Cookies are left by websites and trackers on those websites to follow your activity on the Internet.
It's absolutely horrifying of the level of privacy invasion that's occurring, it's worst on iOS devices because they offer no way to install software to stop it.
A "Do not Track" request can be made, but tracking companies etc., are ignoring it.
If you don't want to be tracked, you can take matters into your own hands.
Install the free Firefox web browser.
Install the free Ad Block Plus add-on for Firefox and set up with Easy list autoupdating (automatic now)
Install the free Ghostery add-on and enable everything to block cookies, trackers and web bugs and also enable delete Flash and Silverlight cookies upon quit.
Install the free Click&Clean, it will clean Firefox upon exit, check the preferences.
Install the free HTTPSEverywhere add-on from the Electronic Frontier Foundation
Install the free TrackMeNot add-on, this sends (clean) random search data to search engines as they record all that too.
Install the free Web of Trust,, this is a community warning system of bad or malicious sites.
Install the free NoScript add-on and then Tools > Customize and drag the Temp Allow All button to the toolbar, this will prevent all scripts (Javascript, Java, Flash, etc) from running unless you click the button (and trust the site). This way they can't use scripts maliciously (Javascipt for History Sniffing, popup windows etc) exploits or "abilites" or coookies in Java, Flash and Silverlight, to track you or attack your machine. If you trust the site you can while list it or temp allow it.
Disable Java in your browsers perferences it's nearly always insecure, Disable Flash and only use it on sites you trust.
Disable any other browser plug-ins that are not used that much, the object is to have minimal things running as you surf the net.
If your into adult content like 10% of Internet traffic is, then learn to use a virtual machine and a operating system in that. This way once your finished you can "rollback" to a previous uninfected version that you only update, never use in a manner that it can become infected.
Windows in BootCamp or Virtual Machine?