Browser security can also be attacked with spy programs and viruses. Pop-ups are annoying and can contain viruses and spy programs that can automatically be downloaded onto your computer. To reduce the risk to your computer you should always block pop-ups and active scripts until you are happy that they are from a reputable website and will not harm your computer.
Web pages can contain scripts that write information to or read information from your computer. Commercial companies like Amazon store cookies on your computer to record information on who you; the next time you return to the site it looks for this cookie and reads the information so that it can recognise you and welcome you back. Others are not as well meaning: cookies could be used to send information of where you browse to on the web to third parties so that they can target you with their products (via more pop-ups) or add hyperlinks to text on a page that will then point to their site.