Cookies are small text files sent from websites that the user is currently visiting. These data are then stored in text files on the user’s computer and, in occasion of subsequent visits, sent back to the website that sent them previously.
Third-party cookies, on the other hand, are text files sent from a different site than the one the user is visiting. This is because sometimes it may happen that data such as images, specific links, maps reside in a different server from the one of the visited site.
In both cases these small pieces of data are very important for a website because they allow to improve the user experience in the use of the sites by collecting information on the carried out navigation.
Cookies for example can remind the site of your browsing preferences to avoid selecting the language every time, in order to make simpler subsequent visits;
Shortly, Cookies allow you to save time as they help the site to remember your browsing preferences to avoid having to re-type them every time you return to that specific website; also they can be used to make "anonymous surveys" on how users navigate through the site, so that they can then improve it basing on real data (for example with Google Analytics).
Cookies don’t record personal information, in fact any identifiable data will never be stored.
These data, therefore, can only be read by computers and often have an expiration date, after which the browser deletes them automatically.