Your browser accepts this data and stores it on your hard disk. At some later time when you revisit a site, your web browser will give the information in the cookie back to the server.
Cookies generally expire after a specified date.
But a cookie can contain whatever data the sender wants to store about you. It could contain your IP address or a unique ID generated by the server. If you provide an e-mail address or credit card number when you visit a site, this might be stored in the cookie. Many commercial sites use cookies to collect information for marketing purposes or to track the number of unique visitors or to count repeat visits from an individual. You too can use cookies to collect information if you have a server that supports CGI scripts.