Cookies are text files that include little bits of information, such as a login and password, and are used to recognize your machine when you’re connected to a computer network. HTTP cookies are a particular type of cookie that are used to identify specific users and enhance online surfing.
Your computer and the system and network exchange cookies, and when they do, the server scans the ID and knows what data to provide you directly.
The server creates data in a cookie as soon as you connect. An ID that is specific to you and your machine is used to identify this data.