Cookies, also known as HTTP cookies, web cookies, or browser cookies are designed to hold a modest amount of data specific to a particular client and a specific website, and can be accessed either by the website's web server or the clients computer.
This allows the server to deliver a page tailored to a particular user, or the page itself can contain some script which is aware of the data in the cookie and so is able to carry information from one page or visit to the website (or related site) to the next. Cookies do not and cannot carry viruses, and cannot install malware on the host computer. Cookies fall into one of two groups depending on how long they last / are used:
Will only last for your online session and disappear from your computer or device when you close your browser.
Activated every time you visit the site that generated the cookie and remain on your computer/device for a time specified in the cookie itself.
Cookies are a convenient way to carry information from one session on a website to another, or between sessions on related website's, without having to burden a web server machine with massive amounts of data storage. This data could be something as simple as your username, so that you do not have to type it in each time you visit a website.
Storing the data on the server without using cookies would also be problematic because it would be difficult to recognise and retrieve a particular user's information without implementing user login's on each visit to the website. Browsing the website would be slower and less user friendly.
First party cookies are set by the website you are visiting and they can only be read by that site.
Websites with shopping baskets (like Amazon and Ebay) would not work without cookies.
Third party cookies are set by a different organisation to the owner of the website you are visiting. For example, the website might use a third party analytics company who will set their own cookie to perform this service. The website you are visiting may also contain content embedded from, for example YouTube or Flickr, and these sites may set their own cookies.
http://www.channel4.com/ | http://www.whatarecookies.com/
http://www.bbc.co.uk | https://developers.google.com/