The Mask component restricts the rendering of anything beneath it. It requires an Image component, text, arc, rectmesh, or anything that displays a graphic on the same slot. Only opaque areas of the graphic on the same slot will render the UIX below. This is also utilized in ScrollRect since it can mask anything outside of the scrolling viewport when using the component.
This can have issues with UIX's behind, since there are some rendering bugs with Unity.
There is a UIX Tutorial that use masking and ScrollRects to help you understand how masks work.