Pieces of information transferred to your computer’s hard disk from a website are known as "cookies".
They are not computer programs, just small information files which allow websites to store and access information about a user’s browsing patterns.
Most websites use cookies, because they are part of the tool box which makes the Internet a great experience for users. Cookies allows websites to deliver personalised services (for example, remembering a login, keeping products in a shopping basket or showing content which is relevant).
There are different types off cookies: temporary cookies (or session cookies) are erased when the browser closes; persistent cookies are not erased but stay until they are actively erased or they expire (which is dependent on how long the website has programmed the cookie to last).