HTTP is a stateless protocol and as such technically each page you visit on a site it would not know who you were. Cookies store key=value pairs of data. One of the most common values will be some type of session id. This is generated by the web site after you have authenticated with your username/password or other credentials. The session id is used in place of your username/password to identify you. They can also be used to track user preferences or other more personal things the site knows about you but their are more and more privacy laws to curtail these practices such as the EUs cookie privacy law. You can go into the dev tools of most browsers and see everything that is in the cookie for the current site you are on.