A mask can be created by using the pen tool in Photoshop. There are three ways to create a mask with the pen tool:
Using the pen-tool to create a shape that fits over the desired area
Creating points along the edge of an object with the pen tool
Drawing a path around an object with the pen tool is one of the best ways to create an intricate shape in a vector. To do this, simply select the pen tool and trace your way along the perimeter of your object with it. Once you have finished tracing, click on "Object" in the top menu and then "Path."