They are simply small text files that usually contain two key pieces of information: the site name and a unique personal ID. They can collect more personal information, but it is up to you what you are willing to share.
They are created by the website and stored on your computer so that when you revisit the website, it will remember you.
Cookies are able to remember you, which is really convenient, especially if you’re online shopping and you have items saved in your cart – you can leave the website and return, and they will still be there. When you first visit a website, the cookie will be downloaded so that when you revisit it, the website can refer back to the original cookie file to present the pages with your preferences, which might include language settings and colour schemes.
Some website cookies are essential, and certain functions may not be possible without allowing them, such as creating accounts with usernames and passwords.