It varies from website to website. HTML 5 has a feature called local storage, which lets websites store a modest amount of data in the browser for future visits. They're a bit like cookies, but can be used to store more data. Like cookies, different sites use it for different things.
Some sites use it to save your preferences on the site (e.g. search options, or what posts you've read) to give you the same view or content on multiple visits without you having to login and save preferences on the server. They might even use it for your content: for example, a forum site might save draft posts/comments in local storage before you post them, so your work isn't lost even if you lose connection to the site while writing.
CSS Tricks has a brief description of local storage, along with some examples of what sites do or might use it for.