A cookie is used by a website to send 'state information' to a user’s browser and for the browser to return the state information to the website. The state information can be used for authentication, identification of a user session, user preferences, or anything else that can be accomplished through storing data on the user's computer.
Cookies cannot be programmed, they do not carry viruses, and cannot install malware on the host computer. They can however be used to track users’ browsing activities. This was a concern that prompted the legal notices.
Cookies are used by most websites. This is for practical reasons to enable the operation of the website. They are also used to monitor how people are using the website (which pages are visited and how long is spent on each page) however this is not to identify the user in person.
The law requires that users must be able to opt-out from having cookies stored on their computer. If you opt-out/disable cookies, this is recorded so you don't get asked the question again. If you opt-out, most of the website works as you would expect however interactions that rely on cookies are disabled, for example online forms or any part of a website that requires you to log in.