Choose Paint > Shape > Make Mask Shape, click the curves that define the mask shape, and click Accept.
You can create a mask from a curve or set of curves in a similar way that you create shapes from curves.
See Create a shape.
These curves will define the inner and outer boundaries of the shape.
To remove a curve from the selection, click it.
You can also set Global Auto-Shape Type to Mask in the Paint Panel. Curves that you draw will then automatically create mask shapes.