This is so we can "remember" your computer and your setting when you come back. A cookie can e.g. save your shopping cart and remember that you are logged in.
A cookia cam not spread a computer virus or other malignant programs. Cookies are only used to analyse how the web page is being used, to help the webdesigners in improving the user experience when shopping.
Most cookies are deleted when you close your browser. These cookies are called session-cookies. Other cookies can be stored on the harddrive for at longer period of time. These are known as permanent cookies.
A distinction is made in general between first part and third part cookies. First part cookies are left by the page you are visiting while third part cookies are imbedded in elements on the page that comes from other sites. Third part cookies are e.g. set by alanysis programs like Google Analytics.