What exactly is a cookie? Basically, cookies are just small bits of information placed on your computer by different websites. Most of the time, cookies are placed on your computer to save you time; for instance, you visit a website where you set some unique preferences, and the next time you visit that site, it will remember those preferences. In addition, most cookies are completely legitimate and help smooth out your browsing experience. Some, however, are not, and that's where managing cookies in Firefox comes in.
There are several different ways to manage your cookies within the Firefox browser, and in fact, for most users there really is no need to go into the super detailed ways you can restrict cookies. I'm going to go over what I've got set as standard on my own machine. As before, click on Tools, Options,Privacy, then Cookies.
The default option is to let websites set cookies. I recommend that you choose this option, with the proviso that you also check that little box that says "for the originating site only." This will only allow cookies from the orginal site, rather than annoying third party ads and such.
How long should you keep cookies? My Firefox is set to "until I close Firefox." This way, your cookies smooth your browsing experience only when you're browsing.There's a lot more detail we can go into (setting individual sites to allow or disallow cookies, for example), but the above settings should be sufficient.