Mach (German for do) is a command-line interface to help developers perform common tasks. The purpose of mach is to help make the developer experience better by making common tasks easier to perform.
Mach requires a current version of mozilla-central (or a tree derived from) (mach was committed on 2012-09-26). Mach also requires Python 2.7. mach itself is Python 3 compliant. However, modules used by mach likely aren't Python 3 compliant just yet. Stick to Python 2.7.
From the root of the source tree checkout, you should just be able to type:
If all is well, you should see a help message.
For full help:
$ ./mach help
Try building the tree:
$ ./mach build
If you get error messages, make sure that you have all of the build requisites for your system.
If it works, you can look at compiler warnings:
$ ./mach warnings-list
Try running some tests:
$ ./mach xpcshell-test services/common/tests/unit/
Or run an individual test:
$ ./mach mochitest-browser browser/base/content/test/browser_pinnedTabs.js
You run mach from the source directory, so you should be able to use your shell's tab completion to tab-complete paths to tests. Mach figures out how to execute the tests for you!