//mask [block-name or block list]
After creating a brush, you can type this command to ensure that the brush only changes the blocks you list in your mask command.
Example:
//brush sphere dirt 12
Sets your tool to create spheres of dirt with a radius of 12 blocks (pretty big)
Then type:
//mask stone,gravel
Now, when you use your tool, you will replace all stone and gravel with dirt blocks that are within 12 blocks of the place you click. Really handy!
Another good use for masking is to mask air:
//mask air
This results in your brush only filling air. A sphere of dirt, for example, could appear attached to a wall, because the wall is not air.