Under 'Edit', 'Preferences', 'Privacy', you can set it to delete cookies and clear history when you close Firefox, or (depending on which version you're using) you can choose 'Automatically start Firefox in a private browsing session' and everything will be cleared.
"Firefox will not record browsing history, search history, download history, web form history, cookies and temporary Internet files. Bookmarks as well as downloads on the other hand will be retained in private browsing mode.
The main difference between clearing data when closing the browser and using the Private Browsing mode is that the Private Browsing mode will never store data on the hard drive.
It is important to note that private browsing is only helpful to avoid records of browsing sessions on the computer used. It does not hide the user from the Internet Provider or websites that they visit."