Cookies are messages that the web server sends to your web browser when you visit a website. The browser saves each message in a small file called cookie.txt. When you request another page, your browser sends a cookie back to the server. These files usually contain information about your visit to the website and information that you provide voluntarily for example, Your name or interests.
The term cookie is a hint of a Unix program called Fortune Cookie that creates a different message or state each time it runs.
Cookies are commonly used to track website activity. When you visit several websites, the server provides a cookie that identifies you. Each time you visit this site, your browser sends this cookie back to the server. In this way, the web server can collect information about which websites are most frequently used and which pages are most frequently repeated.
Although people have had concerns about how secure cookies are,only the website that sets the cookie can read the cookie, so no other server can access your information. In addition, the web server can only use the information or choices that the user provides when visiting a website as cookie contents.
Webmasters can always track access to their website, but using cookies makes it easier for them. In some cases, cookies come from advertising companies that advertise on multiple websites (e.g. DoubleClick.com) and not on the websites you visit. An advertising company can create a detailed profile of people who choose advertising on a client’s site.
If you accept cookies, the server will not be able to access your computer or other personal information (except for intentionally provided information, such as online purchases). It is also not possible to execute code from a cookie and send a virus using cookies.
You can also read about Cache memory
Well,if you feel insecure,you can always protect your data. You can cross check the cookies currently stored in your browser, or control which websites to accept cookies from. You can also decide how long to store and use them. Most modern browsers offer the ability to manage cookies in settings. You can always refer to your browsers and tap to see.