The prefs.js file, located in the profile folder, is used by Firefox, Thunderbird, Mozilla Suite, SeaMonkey and other Mozilla-based applications to store settings. For instance, when you create a new e-mail account in Thunderbird, the account name and server settings will be stored in the prefs.js file in your Thunderbird profile folder. Likewise, if you use the application's user interface (dialog boxes) to change settings from their default values, these will be written to prefs.js. Some extensions also store their settings in prefs.js.
The prefs.js file does not actually contain all of the settings. It only stores changes made to the defaults, after they are written back to disk. This normally occurs when you exit the Mozilla-based application.
Prefs.js is a plain-text file that can be edited with a text editor. However, its recommended that you don't edit it directly since you can damage your profile if you make any mistakes. Its recommended you use one of the standard methods.
The user.js file is optional. If you have one whenever the application is started it will overwrite any settings in prefs.js with the corresponding settings from user.js.