Layer masks are the soul of Photoshop—the key to combining images in a completely nondestructive manner. They enable you to move, hide, blend, conceal, and experiment with image combinations to your heart's content—all without ever losing a single pixel.
Each layer can support a pixel and a vector layer mask. Pixel-based masks are used for blending photographs together, to gradually have images or tone and color changes fade in and out, and wherever painted or soft edge quality is desired. Vector-based masks are employed when Bézier accuracy and crispness is required. Both types are very useful, but the pixel-based mask is the true workhorse of the compositing artist.