When you want to create a layer mask in Photoshop, you need to first select the layer that you want to mask. Then, use the following steps to create the mask:

  1. Choose the Edit menu and choose Mask.
  2. In the Mask dialog box, select a rectangular shape and click OK.
  3. Click on the layer thumbnail in the Layers palette and drag it up or down to change its size. The size of the mask will depend on how much data is inside it.