The next time you visit that site, your PC checks to see if it has a cookie that is relevant (that is, one containing the site name) and sends the information contained in that cookie back to the site.
Cookies are not applications, they are not by themselves malicious and they can be very helpful.
They are mainly used to help recall something about the user, such as their preferences, usernames and shopping lists, and are very common to most websites. They are simple text files that you can read using any word processor on your machine. Typically, they contain two pieces of information: a site name and unique user ID - the cookie does not contain personal details. Generally the role of cookies is beneficial, making your interaction with frequently visited sites smoother at no additional effort. Without cookies, online shopping would be much harder.
Some cookies are more complex - they might record how long you spend on each page on a site, what links you click, even your preferences for page layouts and colour schemes. These are often also use to monitor visitor behaviour while on a website. This means that website owners can check which pages are the most popular, which get visited first, how a visitor navigates a site, how long they visit and more. This is generally used to improve site design but can be used for marketing by the website owner.
Cookies can also be used by advertising and marketing companies to track your visits, what adverts you see and whether you click any adverts, but also to offer targeted marketing; adverts which are more relevant to you. You are, of course, entitled to opt out of this if you don’t fancy the idea: most browsers now give you a ‘disable third party cookies’ option which disables this kind of marketing from companies that are not the one you are shopping with.
What are cookies?