Cookies are pieces of data, normally stored in text files, that websites place on visitors' computers to store a range of information, usually specific to that visitor - or rather the device they are using to view the site - like the browser or mobile phone. They were created to overcome a limitation in web technology. Web pages are 'stateless' - which means that they have no memory, and cannot easily pass information between each other. So cookies provide a kind of memory for web pages. Cookies allow you to login on one page, then move around to other pages and stay logged in. They allow you to set preferences for the display of a page, and for these to be remembered the next time you return to it.
Read more about cookies at the Swedish Post and Telecom Authority (PTS) website below.