They are tiny text files created by a website through a browser on your computer. They are used to help you navigate a website, identify preferences and perform specific functions; for example, remembering which pages you visited or product you ordered.
When you visit subsequent pages on the website, it may use the information inside the cookie to provide certain functionality. When you revisit the website, it may again request that cookie to assist functionality within that website further, e.g. automatically remember the product you last looked at.