First: open your Firefox Browser menu (Hold -Alt key) and navigate to Tools -> Options.
Alternatively click on the Firefox Button to access menu and options
Secound: in the opened Options window navigate to the Privacy tab.
Third: in the Privacy tab select from the Drop down: "Use custom settings for history".
Fourth: new Checkboxes are now visible, de-select the "Accept third-party cookies", see tips section for more!
Cookies are stored over a specific time however you can change it by selecting a different value in "Keep until" Drop down.
Do not de-select normal first party cookies as most websites use them for user authentication or storing vital data, however they can be used for tracking too, use plugins & extensions for more granual control.
The checkbox "Tell web sites I do no want to be tracked" will inform websites that you should not be tracked however this is not enforcable.
Firefox has more advanced settings that can be accessed by entering about:config in the url bar.
For more privacy and security you might also like to check out these plugins & extensions for Firefox.