A cookie is actually saved when a website is visited, it can be generally saved by the administrator or a forum directly, cookies have many uses, like our user name and password can be saved as a cookie, or login details can be saved as a cookie, I dont have much knowledge to you regarding that but i will provide you a link, please visit this link to get your information
http://en.wikipedia.org/wiki/HTTP_cookie
This is from wikipedia website, and you can get the complete details regarding the cookie.