If your question is as simple as I understood it...
All you have to do it hit MM, then click on the stopwatch for 'Mask Path'. Move along in the time line, and move the mask with the 'convert vertex' tool. And you have a keyframed mask!
Hope this helps.
By asking if you can move a mask while a subject moves it sounds like you might be describing rotoscoping. The process of animating a mask to isolate a subject from the background.
If that's what you want, follow the suggestions given above. M to reveal the mask properties, click on the stopwatch, and then move the verticies.
If you would like to look at the best tutorials I've ever seen on masking I'd take a look at Scott Squires Roto part 1 and Roto part 2 videos. He's using Commotion (which I still have installed on an older windows machine because it's about the best roto tool out there) but the procedure is the same in AE. You figure out what is the easiest to cut out, Cut out a bunch of pieces to make the entire roto, then animate the pieces.
BTW, the links to the videos on Scott Squire's Effects Corner site are the Titles of each section. It's easy to miss the videos. Part 1 is theory, Part 2 is execution.