Mask is a grayscale raster image which is created from vector image. Artists interacts with vector image to create mask with needed shape and then it automatically gets rasterized.
Masks have many purposes. They can be used in a motion tracking workflow to mask out, or influence a particular object in the footage. They can be used for manual rotoscoping to pull a particular object out of the footage, or as a rough matte for green screen keying. Masks are independent from a particular image of movie clip, and so they can just as well be used for creating motion graphics or other effects in the compositor.
See more details about masks here
Masks can be driven over the time so that they follow some object from the footage, e.g. a running actor. For working with animation timing of masks in Blender there is a special mode in Dope Sheet Editor — Mask mode.
By functionality, interface of the Mask is same as for whole Dope Sheet Editor and about this you can see more details in corresponding sections: