There are two types of cookies. One type is called session cookies. These disappear when you close the web browser and are not saved. The other type saves a file permanently on your computer. While you are surfing on a page, this cookie is transmitted between your computer and the server to be able to link information.
Cookies are used to give the visitor a better experience on the site.