Theire main function is:
Keep track of users: when a user enters their username and password, a cookie is stored so that they do not have to be entering them for each page of the server. However, a cookie does not identify only one person, but a combination of computer-browser-user.