According to Wikipedia, an HTTP cookie (usually just called a cookie) is a simple computer file made of text. The information stored by cookies can be used to personalise the experience when using a website. A website can use (the information used by) cookies to find out if someone has visited a website before and record information (data) about what they did.
When someone is using a computer to browse a website, a personalised cookie file can be sent from the website’s server to the person’s computer. The cookie is stored in the web browser on the person’s computer. At some time in the future, the person may browse that website again. The website can send a message to the person’s browser, asking if a cookie from the website is already stored in the browser. If a cookie is found, then the data that was stored in the cookie before can be used by the website to tell the website about the person’s previous activity. Some examples where cookies are used include shopping carts, automatic login and remembering which advertisements have already been shown.
Cookies have often been mistaken for computer programs. But cookies cannot do much on their own. They are simply a piece of data. They are often called spyware or viruses, but they are not either of these.
You can control and/or delete cookies as you wish – for details, see aboutcookies.org. You can delete all cookies that are already on your computer and you can set most browsers to prevent them from being placed. If you do this, however, you may have to manually adjust some preferences every time you visit a site and some services and functionalities may not work.