masks can be applied to dim or blot out parts of layers. they can also be used on adjustment layers (levels or curves, e.g.) adjusting the size, opacity and hardness (not sure exactly how brush 'fill' works) of the brush (painting with black or white in the mask, not the layer itself) allows you to achieve detailed effects on layers, or where the adjustment layers will apply. the stacking order of layers and adjustment layers is important, as they effect everything visible after other layers and masks below them, but nothing above. You can also globally adjust the opacity of the layer in the layers panel in conjunction with masks. This is best learned with practice, as you need eyeballs on the screen and a hand on the mouse to follow in detail. Don't be afraid to try new things, and don't save over the originals (or edits you like). [side note: filters unlike adjustment layers, alter the current layer, not create a new one. they can still be undone until you quit (up to maximum undos which you can set to 100, but is 10 by default, I think. each brush click steals one undo]
http://www.photoshopessentials.com/basics/layers/layer-masks/