Because the servers that receive your requests for Web pages have no way of knowing specifically who is making a request, they have no way of storing settings for specific users or changing the page they send based on choices a user has made on another page. When your browser requests a page, it sends the settings that apply to that page along with the request. Because your browser will only send the settings back to the server that originally created them, cookies are a very secure way of maintaining data that is specific to a particular user.
Cookies can be temporary or permanent.
Your browser keeps track of temporary cookies as long as it is running, but deletes them when it is shut down. Temporary cookies are used to pass information between Web pages during a single visit. Your browser saves permanent cookies as tiny files on your system to maintain settings or data between multiple visits. Cookies are currently the only way to save personal choices between visits to a Web page without having to log in each time you come to the page.