A mask can be used when you want to show only part of the content in a layer, or group of layers. To make a mask, do these things:
Here's are two views of what the stage looks like with a jpg imported into the pink_flower layer and mask in the layer above that consists of a solid rectangle plus some text. One view (with layers unlocked) shows the photo and the mask above it; the other (with both layers locked) shows what the published swf will look like.

These are the steps to create that:
The example above is of a static mask over a static shape, but both the mask and the content in the layer below it can also contain moving parts (tweens, keyframe animation). Here is an example of the photo transitions shown on the more motion tweens page with the same mask as above in a layer above them (all layers of the photo transition movie were dragged under the mask):
And here is a rather garish example in which the photos are motion-tweened as before, and the mask layer has also been tweened (in this case, shape-tweened). Open maskflowers3.fla to see how the shape-tweening is implemented.
Masks can also be used for handwriting or drawing effects, where an outline or shape on stage is to be progressively revealed. To make the handwriting sample below, I followed the following steps:
Below is what the timeline looks like after 4 steps of "F6, draw". Bigger strokes can be used in each keyframe if detail is not important. But check along the way to make sure the uncovering looks right; any mistakes made along the way will be carried through in every keyframe to the end of the animation and are hard to fix after the fact:

Discussed on this page:
create mask, motion tweened mask, shaped tweened mask, convert text to shape with Modify, Break Apart, using a mask for handwriting or drawing effect
Files:
flower jpgs
maskflowers1/2/3.fla
maskhandwriting.fla
In tweenandmask.zip, password required
Subscription:
A password may be obtained by subscription ($20 for one month)
An access password will be emailed to the address you specify within 24 hours of receipt of payment, and will remain active for 30 days thereafter. A list of all files currently available at the site may be viewed here.
Student Samples
In her portfolio site, Katie Bakalian used masks to 'animate' the artistic borders in the main page and the portfolio section.