There are several ways you can use Mozilla code in your own project.

Building XUL applications

The Joy of XUL
An introduction to XUL; a must read for new developers.
XUL Reference
The complete reference to XUL.
XULRunner
A Mozilla runtime package that can be used to bootstrap XUL and XPCOM applications with ease.
Mozilla Toolkit
Information about the Mozilla Toolkit API.
Signing Mozilla apps for Mac OS X
How to code-sign applications based on Mozilla code for Mac OS X's application security model.

Using Mozilla components

SpiderMonkey
SpiderMonkey is the JavaScript runtime engine used by Mozilla projects.
NSPR
The Netscape Portable Runtime provides a platform-neutral API for system level and libc-type functions.
Necko
The Mozilla networking library provides cross-platform networking functionality.

Embedding Mozilla

For information on embedding a web browser into your own application see Embedding Mozilla.