A basic example is remembering your geographic location to customize weather, movie or traffic information for you. Cookies can also analyze Web traffic, customize banner ads, store items in your shopping cart, remember your username and password, and do many other things.
Temporary cookies are deleted when you close your browser and are just used to help you in that session. Saved cookies remain on your PC and help you the next time you go to that site, sometimes remaining there for years. Cookies are files you can delete. If you delete a cookie that is storing your user ID and password though, you will have to re-enter it again the next time you visit the site.
You need to be selective about which Web sites you allow to give you a cookie. Cookies are not really a threat for viruses or malware, but you may feel for example that tracking your visits to certain Web sites or having them remember your login information compromise your privacy. That is a personal decision you can make site by site now that you know what cookies do.
You can control how you treat cookies with your Internet browser privacy settings. You probably do not want to block all cookies, because that would really limit the quality of your Internet experience. You can set your browser to ask your permission before accepting a cookie though, and only accept them from Web sites you trust.
In some cases, you cannot make a wireless connection or access a Web site without allowing cookies for that site. Search cookies in your browser's help tool for information on how to control and manage cookies on your PC.