The articles below will help you get your hands on the Mozilla source code, learn to navigate the code, and how to get the changes you propose checked into the tree.

Mercurial Overview
If you plan to contribute to the Mozilla project, the best way to get the code is to check it out from the version control repository. Learn how to do that here.
Downloading Source Archives
If you want to fetch the code for a specific release of a particular Mozilla product, you may prefer to download a source code archive.
Use Searchfox
Use Searchfox, Mozilla's online search and browsing tool for accessing the source code. This isn't a good way to download the code, but is a great way to search it.
Firefox Source Code Directory Structure
Learn about the various folders in the Firefox source tree, and how to find what you're looking for.
Good first bugs
If you are new to the project and want something to work on, look here.
Firefox coding style
The code style guide provides information about how you should format your source code to ensure that you don't get mocked by the reviewers.
Interface development guide
Guidelines and documentation for how to create and update XPCOM interfaces.
The Firefox codebase: CSS Guidelines
This document contains guidelines defining how CSS inside the Firefox codebase should be written, it is notably relevant for Firefox front-end engineers.
SVG Cleanup Guide
Guidelines and best practices for shipping new SVGs.
Try Servers
Mozilla products build on at least three platforms. If you don't have access to them all, you can use the try servers to test your patches and make sure the tests pass.
How to submit a patch
Once you've made a change to the Mozilla code, the next step (after making sure it works) is to create a patch and submit it for review. This article needs to be updated fully for Mercurial.
Getting commit access to the source code
Feel ready to join the few, the proud, the committers? Find out how to get check-in access to the Mozilla code.
Getting older Mozilla code from CVS
Older versions of the Mozilla source code, as well as the current versions of NSS and NSPR, are kept in a CVS repository. Learn about that in this article.