The Cookie Law is a piece of privacy legislation that requires websites to get consent from people who land on their site to store or retrieve any information on a computer or any other computer device. It was designed to protect online privacy, by making people aware of how information about them is collected and used online, and gave them a real choice to allow the cookie or not.
If started as an EU Directive that was adopted by all EU countries in May 2011.The Directive gave individuals rights to refuse the use of cookies that reduce their online privacy. Each country then updated its own laws to comply. In the UK this meant an update to the Privacy and Electronic Communications Regulations.
To learn more, please visit ICO explains about cookies