A cookie is a simple text file that is stored on your computer o mobile device da a website’s server and only that server will be able to retrieve o read the contents of that cookie. Each cookie is unique to your web browser. It will contain some anonymous information such as a unique identifier and the site name and some digits and numbers. It allows a website to remember things like your preferences o what’s in your shopping basket.
I got that from a website, basically it's just something that will make a website remember te on it, and yes, they're safe!. =)