Are cookies bad? If yes, what are the best ways to protect from it?
They are not bad per se. Cookies are a way of tagging a web browser. This way they can tell if you have visited the website before or not. They could also have assigned you a unique identifier and stored it in the cookie. All the cookie is is effectively a text file.
It is more of a privacy concern that a website is storing cookies than a security one. Under EU law, a website must warn you that it is using cookies. This is the message you are seeing, however there is nothing in particular to be concerned about.
Some advertising networks set a 3rd party cookie. Say if a website you visit,
Bob's Cars includes advertising it may call a script on
adnetwork.example.com. This domain sets a cookie. You then visit
Alice's Angle Grinders. This uses the same ad network and calls a script on
adnetwork.example.com. Now the advertising network knows you are interested in cars and angle grinders and will be able to show you adverts for such items as you visit other websites.
There is currently a court case in Belgium against Facebook for their usage of such cookies without informing users.
Note that cookies cannot normally contain malware or executable content that is ran on its own. However, there have been vulnerabilities in old versions of Internet Explorer that allowed cookies to be used in an attack. You should not be concerned about cookies doing such evil if you update your browser to the latest version regularly.
If you are concerned about privacy, use Private Browsing or Incognito mode. This gives you a browser session with no cookies set and will also clear them when you close your session. Alternatively use privacy browser extensions such as Adblock Plus and Ghostery to limit the number of tracking cookies stored.
Cache is not evil either. These are just locally stored copies of internet files, such as images and client-side scripts. This is for performance reasons and so your browser does not have to redownload them each time you go back to a website you visit often.